diff options
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 9df50fa8a078..27bfce58da3b 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 | } |