Btrfs: Fix BTRFS_IOC_SUBVOL_SETFLAGS ioctl
authorLi Zefan <lizf@cn.fujitsu.com>
Wed, 16 Feb 2011 06:06:34 +0000 (06:06 +0000)
committerChris Mason <chris.mason@oracle.com>
Wed, 16 Feb 2011 20:37:58 +0000 (15:37 -0500)
commitb4dc2b8c694ead005b828f5fb7fa1134db5b6275
treeba01c2bb5381ab9a34c4152ed4dd83c1797f780c
parentc87f08ca44e83b2c8d28f63f9c33f3a270a04bbe
Btrfs: Fix BTRFS_IOC_SUBVOL_SETFLAGS ioctl

- Check user-specified flags correctly
- Check the inode owership
- Search root item in root tree but not fs tree

Reported-by: Dan Rosenberg <drosenberg@vsecurity.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/ioctl.c