提交 2d4e6f6a 编写于 作者: L liubo 提交者: root

Btrfs: fix return value of setflags ioctl

setflags ioctl should return error when any checks fail.
Signed-off-by: NLiu Bo <liubo2009@cn.fujitsu.com>
Reviewed-by: NDavid Sterba <dsterba@suse.cz>
Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 dac97e51
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册