diff options
-rw-r--r-- | fs/btrfs/delayed-inode.c | 8 | ||||
-rw-r--r-- | fs/btrfs/inode.c | 8 | ||||
-rw-r--r-- | fs/btrfs/ioctl.c | 6 | ||||
-rw-r--r-- | init/Kconfig | 1 |
4 files changed, 11 insertions, 12 deletions
diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c index 335605c8ceab..f908c5180795 100644 --- a/fs/btrfs/delayed-inode.c +++ b/fs/btrfs/delayed-inode.c | |||
@@ -1715,8 +1715,8 @@ static void fill_stack_inode_item(struct btrfs_trans_handle *trans, | |||
1715 | struct btrfs_inode_item *inode_item, | 1715 | struct btrfs_inode_item *inode_item, |
1716 | struct inode *inode) | 1716 | struct inode *inode) |
1717 | { | 1717 | { |
1718 | btrfs_set_stack_inode_uid(inode_item, inode->i_uid); | 1718 | btrfs_set_stack_inode_uid(inode_item, i_uid_read(inode)); |
1719 | btrfs_set_stack_inode_gid(inode_item, inode->i_gid); | 1719 | btrfs_set_stack_inode_gid(inode_item, i_gid_read(inode)); |
1720 | btrfs_set_stack_inode_size(inode_item, BTRFS_I(inode)->disk_i_size); | 1720 | btrfs_set_stack_inode_size(inode_item, BTRFS_I(inode)->disk_i_size); |
1721 | btrfs_set_stack_inode_mode(inode_item, inode->i_mode); | 1721 | btrfs_set_stack_inode_mode(inode_item, inode->i_mode); |
1722 | btrfs_set_stack_inode_nlink(inode_item, inode->i_nlink); | 1722 | btrfs_set_stack_inode_nlink(inode_item, inode->i_nlink); |
@@ -1764,8 +1764,8 @@ int btrfs_fill_inode(struct inode *inode, u32 *rdev) | |||
1764 | 1764 | ||
1765 | inode_item = &delayed_node->inode_item; | 1765 | inode_item = &delayed_node->inode_item; |
1766 | 1766 | ||
1767 | inode->i_uid = btrfs_stack_inode_uid(inode_item); | 1767 | i_uid_write(inode, btrfs_stack_inode_uid(inode_item)); |
1768 | inode->i_gid = btrfs_stack_inode_gid(inode_item); | 1768 | i_gid_write(inode, btrfs_stack_inode_gid(inode_item)); |
1769 | btrfs_i_size_write(inode, btrfs_stack_inode_size(inode_item)); | 1769 | btrfs_i_size_write(inode, btrfs_stack_inode_size(inode_item)); |
1770 | inode->i_mode = btrfs_stack_inode_mode(inode_item); | 1770 | inode->i_mode = btrfs_stack_inode_mode(inode_item); |
1771 | set_nlink(inode, btrfs_stack_inode_nlink(inode_item)); | 1771 | set_nlink(inode, btrfs_stack_inode_nlink(inode_item)); |
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 83baec24946d..53687149c077 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -2570,8 +2570,8 @@ static void btrfs_read_locked_inode(struct inode *inode) | |||
2570 | struct btrfs_inode_item); | 2570 | struct btrfs_inode_item); |
2571 | inode->i_mode = btrfs_inode_mode(leaf, inode_item); | 2571 | inode->i_mode = btrfs_inode_mode(leaf, inode_item); |
2572 | set_nlink(inode, btrfs_inode_nlink(leaf, inode_item)); | 2572 | set_nlink(inode, btrfs_inode_nlink(leaf, inode_item)); |
2573 | inode->i_uid = btrfs_inode_uid(leaf, inode_item); | 2573 | i_uid_write(inode, btrfs_inode_uid(leaf, inode_item)); |
2574 | inode->i_gid = btrfs_inode_gid(leaf, inode_item); | 2574 | i_gid_write(inode, btrfs_inode_gid(leaf, inode_item)); |
2575 | btrfs_i_size_write(inode, btrfs_inode_size(leaf, inode_item)); | 2575 | btrfs_i_size_write(inode, btrfs_inode_size(leaf, inode_item)); |
2576 | 2576 | ||
2577 | tspec = btrfs_inode_atime(inode_item); | 2577 | tspec = btrfs_inode_atime(inode_item); |
@@ -2649,8 +2649,8 @@ static void fill_inode_item(struct btrfs_trans_handle *trans, | |||
2649 | struct btrfs_inode_item *item, | 2649 | struct btrfs_inode_item *item, |
2650 | struct inode *inode) | 2650 | struct inode *inode) |
2651 | { | 2651 | { |
2652 | btrfs_set_inode_uid(leaf, item, inode->i_uid); | 2652 | btrfs_set_inode_uid(leaf, item, i_uid_read(inode)); |
2653 | btrfs_set_inode_gid(leaf, item, inode->i_gid); | 2653 | btrfs_set_inode_gid(leaf, item, i_gid_read(inode)); |
2654 | btrfs_set_inode_size(leaf, item, BTRFS_I(inode)->disk_i_size); | 2654 | btrfs_set_inode_size(leaf, item, BTRFS_I(inode)->disk_i_size); |
2655 | btrfs_set_inode_mode(leaf, item, inode->i_mode); | 2655 | btrfs_set_inode_mode(leaf, item, inode->i_mode); |
2656 | btrfs_set_inode_nlink(leaf, item, inode->i_nlink); | 2656 | btrfs_set_inode_nlink(leaf, item, inode->i_nlink); |
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index bc2f6ffff3cf..1292682c537f 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -575,13 +575,13 @@ fail: | |||
575 | */ | 575 | */ |
576 | static inline int btrfs_check_sticky(struct inode *dir, struct inode *inode) | 576 | static inline int btrfs_check_sticky(struct inode *dir, struct inode *inode) |
577 | { | 577 | { |
578 | uid_t fsuid = current_fsuid(); | 578 | kuid_t fsuid = current_fsuid(); |
579 | 579 | ||
580 | if (!(dir->i_mode & S_ISVTX)) | 580 | if (!(dir->i_mode & S_ISVTX)) |
581 | return 0; | 581 | return 0; |
582 | if (inode->i_uid == fsuid) | 582 | if (uid_eq(inode->i_uid, fsuid)) |
583 | return 0; | 583 | return 0; |
584 | if (dir->i_uid == fsuid) | 584 | if (uid_eq(dir->i_uid, fsuid)) |
585 | return 0; | 585 | return 0; |
586 | return !capable(CAP_FOWNER); | 586 | return !capable(CAP_FOWNER); |
587 | } | 587 | } |
diff --git a/init/Kconfig b/init/Kconfig index fd91d2b63875..44f580f406d0 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -930,7 +930,6 @@ config UIDGID_CONVERTED | |||
930 | depends on 9P_FS = n | 930 | depends on 9P_FS = n |
931 | depends on AFS_FS = n | 931 | depends on AFS_FS = n |
932 | depends on AUTOFS4_FS = n | 932 | depends on AUTOFS4_FS = n |
933 | depends on BTRFS_FS = n | ||
934 | depends on CEPH_FS = n | 933 | depends on CEPH_FS = n |
935 | depends on CIFS = n | 934 | depends on CIFS = n |
936 | depends on CODA_FS = n | 935 | depends on CODA_FS = n |