summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorliubo <liubo2009@cn.fujitsu.com>2011-02-24 09:38:16 +0000
committerroot <Chris Mason chris.mason@oracle.com>2011-03-28 05:37:51 -0400
commit2d4e6f6ad2b9f84f568d07dae4bdbc7f48a70ad1 (patch)
treeeb1490b2b5383fc92eaf276ef31011ec206a2439 /fs
parentdac97e516c617f9c797f64b0224050b70aea30c7 (diff)
downloadop-kernel-dev-2d4e6f6ad2b9f84f568d07dae4bdbc7f48a70ad1.zip
op-kernel-dev-2d4e6f6ad2b9f84f568d07dae4bdbc7f48a70ad1.tar.gz
Btrfs: fix return value of setflags ioctl
setflags ioctl should return error when any checks fail. Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com> Reviewed-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/ioctl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 649f47d..6b70e0e 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -247,9 +247,11 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg)
btrfs_end_transaction(trans, root);
mnt_drop_write(file->f_path.mnt);
+
+ ret = 0;
out_unlock:
mutex_unlock(&inode->i_mutex);
- return 0;
+ return ret;
}
static int btrfs_ioctl_getversion(struct file *file, int __user *arg)
OpenPOWER on IntegriCloud