aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_ioctl.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2008-07-21 16:16:15 +1000
committerNiv Sardi <xaiki@debian.org>2008-07-28 16:59:39 +1000
commitf13fae2d2a9372a5155d20bc9da4c14f02193277 (patch)
tree19bca1e8b3d5034ff84ad19e6a7640216ed3afaf /fs/xfs/linux-2.6/xfs_ioctl.c
parent0f285c8a1c4cacfd9f2aec077b06e2b537ee57ab (diff)
downloadkernel_samsung_smdk4412-f13fae2d2a9372a5155d20bc9da4c14f02193277.zip
kernel_samsung_smdk4412-f13fae2d2a9372a5155d20bc9da4c14f02193277.tar.gz
kernel_samsung_smdk4412-f13fae2d2a9372a5155d20bc9da4c14f02193277.tar.bz2
[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/linux-2.6/xfs_ioctl.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_ioctl.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c
index d1b0da6..acb978d 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl.c
@@ -923,6 +923,30 @@ xfs_set_diflags(
ip->i_d.di_flags = di_flags;
}
+STATIC void
+xfs_diflags_to_linux(
+ struct xfs_inode *ip)
+{
+ struct inode *inode = XFS_ITOV(ip);
+ unsigned int xflags = xfs_ip2xflags(ip);
+
+ if (xflags & XFS_XFLAG_IMMUTABLE)
+ inode->i_flags |= S_IMMUTABLE;
+ else
+ inode->i_flags &= ~S_IMMUTABLE;
+ if (xflags & XFS_XFLAG_APPEND)
+ inode->i_flags |= S_APPEND;
+ else
+ inode->i_flags &= ~S_APPEND;
+ if (xflags & XFS_XFLAG_SYNC)
+ inode->i_flags |= S_SYNC;
+ else
+ inode->i_flags &= ~S_SYNC;
+ if (xflags & XFS_XFLAG_NOATIME)
+ inode->i_flags |= S_NOATIME;
+ else
+ inode->i_flags &= ~S_NOATIME;
+}
#define FSX_PROJID 1
#define FSX_EXTSIZE 2
@@ -1121,8 +1145,10 @@ xfs_ioctl_setattr(
if (mask & FSX_EXTSIZE)
ip->i_d.di_extsize = fa->fsx_extsize >> mp->m_sb.sb_blocklog;
- if (mask & FSX_XFLAGS)
+ if (mask & FSX_XFLAGS) {
xfs_set_diflags(ip, fa->fsx_xflags);
+ xfs_diflags_to_linux(ip);
+ }
xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
xfs_ichgtime(ip, XFS_ICHGTIME_CHG);
@@ -1160,7 +1186,6 @@ xfs_ioctl_setattr(
(mask & FSX_NONBLOCK) ? DM_FLAGS_NDELAY : 0);
}
- vn_revalidate(XFS_ITOV(ip)); /* update flags */
return 0;
error_return: