]> sourceware.org Git - lvm2.git/commitdiff
cleanup: shorter code
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 31 Oct 2014 12:36:54 +0000 (13:36 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 3 Nov 2014 13:19:34 +0000 (14:19 +0100)
tools/lvcreate.c

index f6786a8116c7d6870a6c9214eb4d762cb4442965..cf2a07cb827cc7f85e3c8a235c40efe973e289e5 100644 (file)
@@ -577,7 +577,7 @@ static int _read_activation_params(struct cmd_context *cmd,
                                    struct volume_group *vg,
                                   struct lvcreate_params *lp)
 {
-       unsigned pagesize;
+       unsigned pagesize = lvm_getpagesize() >> SECTOR_SHIFT;
 
        lp->activate = (activation_change_t)
                arg_uint_value(cmd, activate_ARG, CHANGE_AY);
@@ -585,7 +585,6 @@ static int _read_activation_params(struct cmd_context *cmd,
        /* Read ahead */
        lp->read_ahead = arg_uint_value(cmd, readahead_ARG,
                                        cmd->default_settings.read_ahead);
-       pagesize = lvm_getpagesize() >> SECTOR_SHIFT;
        if (lp->read_ahead != DM_READ_AHEAD_AUTO &&
            lp->read_ahead != DM_READ_AHEAD_NONE &&
            lp->read_ahead % pagesize) {
This page took 0.031076 seconds and 5 git commands to generate.