diff options
author | Christoph Hellwig <hch@infradead.org> | 2008-07-21 02:16:15 -0400 |
---|---|---|
committer | Niv Sardi <xaiki@debian.org> | 2008-07-28 02:59:39 -0400 |
commit | f13fae2d2a9372a5155d20bc9da4c14f02193277 (patch) | |
tree | 19bca1e8b3d5034ff84ad19e6a7640216ed3afaf /fs/xfs/xfs_vnodeops.c | |
parent | 0f285c8a1c4cacfd9f2aec077b06e2b537ee57ab (diff) |
[XFS] Remove vn_revalidate calls in xfs.
These days most of the attributes in struct inode are properly kept in
sync by XFS. This patch removes the need for vn_revalidate completely by:
- keeping inode.i_flags uptodate after any flags are updated in
xfs_ioctl_setattr
- keeping i_mode, i_uid and i_gid uptodate in xfs_setattr
SGI-PV: 984566
SGI-Modid: xfs-linux-melb:xfs-kern:31679a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
-rw-r--r-- | fs/xfs/xfs_vnodeops.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index b792a121b1a7..76a1166af822 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c | |||
@@ -83,6 +83,7 @@ xfs_setattr( | |||
83 | cred_t *credp) | 83 | cred_t *credp) |
84 | { | 84 | { |
85 | xfs_mount_t *mp = ip->i_mount; | 85 | xfs_mount_t *mp = ip->i_mount; |
86 | struct inode *inode = XFS_ITOV(ip); | ||
86 | int mask = iattr->ia_valid; | 87 | int mask = iattr->ia_valid; |
87 | xfs_trans_t *tp; | 88 | xfs_trans_t *tp; |
88 | int code; | 89 | int code; |
@@ -446,6 +447,9 @@ xfs_setattr( | |||
446 | ip->i_d.di_mode &= S_IFMT; | 447 | ip->i_d.di_mode &= S_IFMT; |
447 | ip->i_d.di_mode |= iattr->ia_mode & ~S_IFMT; | 448 | ip->i_d.di_mode |= iattr->ia_mode & ~S_IFMT; |
448 | 449 | ||
450 | inode->i_mode &= S_IFMT; | ||
451 | inode->i_mode |= iattr->ia_mode & ~S_IFMT; | ||
452 | |||
449 | xfs_trans_log_inode (tp, ip, XFS_ILOG_CORE); | 453 | xfs_trans_log_inode (tp, ip, XFS_ILOG_CORE); |
450 | timeflags |= XFS_ICHGTIME_CHG; | 454 | timeflags |= XFS_ICHGTIME_CHG; |
451 | } | 455 | } |
@@ -481,6 +485,7 @@ xfs_setattr( | |||
481 | &ip->i_udquot, udqp); | 485 | &ip->i_udquot, udqp); |
482 | } | 486 | } |
483 | ip->i_d.di_uid = uid; | 487 | ip->i_d.di_uid = uid; |
488 | inode->i_uid = uid; | ||
484 | } | 489 | } |
485 | if (igid != gid) { | 490 | if (igid != gid) { |
486 | if (XFS_IS_GQUOTA_ON(mp)) { | 491 | if (XFS_IS_GQUOTA_ON(mp)) { |
@@ -491,6 +496,7 @@ xfs_setattr( | |||
491 | &ip->i_gdquot, gdqp); | 496 | &ip->i_gdquot, gdqp); |
492 | } | 497 | } |
493 | ip->i_d.di_gid = gid; | 498 | ip->i_d.di_gid = gid; |
499 | inode->i_gid = gid; | ||
494 | } | 500 | } |
495 | 501 | ||
496 | xfs_trans_log_inode (tp, ip, XFS_ILOG_CORE); | 502 | xfs_trans_log_inode (tp, ip, XFS_ILOG_CORE); |
@@ -503,12 +509,14 @@ xfs_setattr( | |||
503 | */ | 509 | */ |
504 | if (mask & (ATTR_ATIME|ATTR_MTIME)) { | 510 | if (mask & (ATTR_ATIME|ATTR_MTIME)) { |
505 | if (mask & ATTR_ATIME) { | 511 | if (mask & ATTR_ATIME) { |
512 | inode->i_atime = iattr->ia_atime; | ||
506 | ip->i_d.di_atime.t_sec = iattr->ia_atime.tv_sec; | 513 | ip->i_d.di_atime.t_sec = iattr->ia_atime.tv_sec; |
507 | ip->i_d.di_atime.t_nsec = iattr->ia_atime.tv_nsec; | 514 | ip->i_d.di_atime.t_nsec = iattr->ia_atime.tv_nsec; |
508 | ip->i_update_core = 1; | 515 | ip->i_update_core = 1; |
509 | timeflags &= ~XFS_ICHGTIME_ACC; | 516 | timeflags &= ~XFS_ICHGTIME_ACC; |
510 | } | 517 | } |
511 | if (mask & ATTR_MTIME) { | 518 | if (mask & ATTR_MTIME) { |
519 | inode->i_mtime = iattr->ia_mtime; | ||
512 | ip->i_d.di_mtime.t_sec = iattr->ia_mtime.tv_sec; | 520 | ip->i_d.di_mtime.t_sec = iattr->ia_mtime.tv_sec; |
513 | ip->i_d.di_mtime.t_nsec = iattr->ia_mtime.tv_nsec; | 521 | ip->i_d.di_mtime.t_nsec = iattr->ia_mtime.tv_nsec; |
514 | timeflags &= ~XFS_ICHGTIME_MOD; | 522 | timeflags &= ~XFS_ICHGTIME_MOD; |
@@ -524,6 +532,7 @@ xfs_setattr( | |||
524 | */ | 532 | */ |
525 | 533 | ||
526 | if ((flags & XFS_ATTR_DMI) && (mask & ATTR_CTIME)) { | 534 | if ((flags & XFS_ATTR_DMI) && (mask & ATTR_CTIME)) { |
535 | inode->i_ctime = iattr->ia_ctime; | ||
527 | ip->i_d.di_ctime.t_sec = iattr->ia_ctime.tv_sec; | 536 | ip->i_d.di_ctime.t_sec = iattr->ia_ctime.tv_sec; |
528 | ip->i_d.di_ctime.t_nsec = iattr->ia_ctime.tv_nsec; | 537 | ip->i_d.di_ctime.t_nsec = iattr->ia_ctime.tv_nsec; |
529 | ip->i_update_core = 1; | 538 | ip->i_update_core = 1; |