setflags ioctl should return error when any checks fail.

Signed-off-by: Liu Bo <liubo2...@cn.fujitsu.com>
---
 fs/btrfs/ioctl.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 02d224e..e397da4 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -213,9 +213,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)
-- 
1.6.5.2
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to