]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/md/dm-ioctl.c
[TG3]: Flush tg3_reset_task()
[linux-2.6-omap-h63xx.git] / drivers / md / dm-ioctl.c
index 561bda5011e00e07f2d0a80e8aa5d147f81cd023..442e2be6052e330f283379b3cc9eb02f7a5855df 100644 (file)
@@ -598,7 +598,7 @@ static int dev_create(struct dm_ioctl *param, size_t param_size)
 /*
  * Always use UUID for lookups if it's present, otherwise use name or dev.
  */
-static inline struct hash_cell *__find_device_hash_cell(struct dm_ioctl *param)
+static struct hash_cell *__find_device_hash_cell(struct dm_ioctl *param)
 {
        if (*param->uuid)
                return __get_uuid_cell(param->uuid);
@@ -608,7 +608,7 @@ static inline struct hash_cell *__find_device_hash_cell(struct dm_ioctl *param)
                return dm_get_mdptr(huge_decode_dev(param->dev));
 }
 
-static inline struct mapped_device *find_device(struct dm_ioctl *param)
+static struct mapped_device *find_device(struct dm_ioctl *param)
 {
        struct hash_cell *hc;
        struct mapped_device *md = NULL;
@@ -1359,16 +1359,11 @@ static int ctl_ioctl(struct inode *inode, struct file *file,
         * Copy the parameters into kernel space.
         */
        r = copy_params(user, &param);
-       if (r) {
-               current->flags &= ~PF_MEMALLOC;
-               return r;
-       }
 
-       /*
-        * FIXME: eventually we will remove the PF_MEMALLOC flag
-        * here.  However the tools still do nasty things like
-        * 'load' while a device is suspended.
-        */
+       current->flags &= ~PF_MEMALLOC;
+
+       if (r)
+               return r;
 
        r = validate_params(cmd, param);
        if (r)
@@ -1386,7 +1381,6 @@ static int ctl_ioctl(struct inode *inode, struct file *file,
 
  out:
        free_params(param);
-       current->flags &= ~PF_MEMALLOC;
        return r;
 }