From: liubo Date: Thu, 24 Feb 2011 09:38:16 +0000 (+0000) Subject: Btrfs: fix return value of setflags ioctl X-Git-Tag: upstream/snapshot3+hdmi~10453^2~46 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2d4e6f6ad2b9f84f568d07dae4bdbc7f48a70ad1;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git Btrfs: fix return value of setflags ioctl setflags ioctl should return error when any checks fail. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: Chris Mason --- 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)