Skip to content

Commit

Permalink
Btrfs: fix return value of setflags ioctl
Browse files Browse the repository at this point in the history
setflags ioctl should return error when any checks fail.

Signed-off-by: Liu Bo <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
  • Loading branch information
liub authored and root committed Mar 28, 2011
1 parent dac97e5 commit 2d4e6f6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2d4e6f6

Please sign in to comment.