aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_iops.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_iops.c')
-rw-r--r--fs/xfs/xfs_iops.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
index a4daa3fd3ae9..0d38b1d2c420 100644
--- a/fs/xfs/xfs_iops.c
+++ b/fs/xfs/xfs_iops.c
@@ -459,7 +459,7 @@ xfs_vn_getattr(
459 459
460 stat->size = XFS_ISIZE(ip); 460 stat->size = XFS_ISIZE(ip);
461 stat->dev = inode->i_sb->s_dev; 461 stat->dev = inode->i_sb->s_dev;
462 stat->mode = ip->i_d.di_mode; 462 stat->mode = inode->i_mode;
463 stat->nlink = inode->i_nlink; 463 stat->nlink = inode->i_nlink;
464 stat->uid = inode->i_uid; 464 stat->uid = inode->i_uid;
465 stat->gid = inode->i_gid; 465 stat->gid = inode->i_gid;
@@ -506,9 +506,6 @@ xfs_setattr_mode(
506 506
507 ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); 507 ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL));
508 508
509 ip->i_d.di_mode &= S_IFMT;
510 ip->i_d.di_mode |= mode & ~S_IFMT;
511
512 inode->i_mode &= S_IFMT; 509 inode->i_mode &= S_IFMT;
513 inode->i_mode |= mode & ~S_IFMT; 510 inode->i_mode |= mode & ~S_IFMT;
514} 511}
@@ -652,9 +649,9 @@ xfs_setattr_nonsize(
652 * The set-user-ID and set-group-ID bits of a file will be 649 * The set-user-ID and set-group-ID bits of a file will be
653 * cleared upon successful return from chown() 650 * cleared upon successful return from chown()
654 */ 651 */
655 if ((ip->i_d.di_mode & (S_ISUID|S_ISGID)) && 652 if ((inode->i_mode & (S_ISUID|S_ISGID)) &&
656 !capable(CAP_FSETID)) 653 !capable(CAP_FSETID))
657 ip->i_d.di_mode &= ~(S_ISUID|S_ISGID); 654 inode->i_mode &= ~(S_ISUID|S_ISGID);
658 655
659 /* 656 /*
660 * Change the ownerships and register quota modifications 657 * Change the ownerships and register quota modifications
@@ -764,7 +761,7 @@ xfs_setattr_size(
764 761
765 ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL)); 762 ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL));
766 ASSERT(xfs_isilocked(ip, XFS_MMAPLOCK_EXCL)); 763 ASSERT(xfs_isilocked(ip, XFS_MMAPLOCK_EXCL));
767 ASSERT(S_ISREG(ip->i_d.di_mode)); 764 ASSERT(S_ISREG(inode->i_mode));
768 ASSERT((iattr->ia_valid & (ATTR_UID|ATTR_GID|ATTR_ATIME|ATTR_ATIME_SET| 765 ASSERT((iattr->ia_valid & (ATTR_UID|ATTR_GID|ATTR_ATIME|ATTR_ATIME_SET|
769 ATTR_MTIME_SET|ATTR_KILL_PRIV|ATTR_TIMES_SET)) == 0); 766 ATTR_MTIME_SET|ATTR_KILL_PRIV|ATTR_TIMES_SET)) == 0);
770 767
@@ -1215,7 +1212,6 @@ xfs_setup_inode(
1215 /* make the inode look hashed for the writeback code */ 1212 /* make the inode look hashed for the writeback code */
1216 hlist_add_fake(&inode->i_hash); 1213 hlist_add_fake(&inode->i_hash);
1217 1214
1218 inode->i_mode = ip->i_d.di_mode;
1219 inode->i_uid = xfs_uid_to_kuid(ip->i_d.di_uid); 1215 inode->i_uid = xfs_uid_to_kuid(ip->i_d.di_uid);
1220 inode->i_gid = xfs_gid_to_kgid(ip->i_d.di_gid); 1216 inode->i_gid = xfs_gid_to_kgid(ip->i_d.di_gid);
1221 1217