diff options
author | Christoph Hellwig <hch@infradead.org> | 2008-08-13 02:23:13 -0400 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-08-13 02:23:13 -0400 |
commit | 41be8bed1f3168f34386f3a15d63682cfd586b8e (patch) | |
tree | 8cddec00890168b807853e5b6761625a3e194f3e /fs/xfs/xfs_inode.c | |
parent | 5ec7f8c7d14a3ea6bf920b3350f5c5d3527cb837 (diff) |
[XFS] sanitize xfs_initialize_vnode
Sanitize setting up the Linux indode.
Setting up the xfs_inode <-> inode link is opencoded in xfs_iget_core now
because that's the only place it needs to be done, xfs_initialize_vnode is
renamed to xfs_setup_inode and loses all superflous paramaters. The check
for I_NEW is removed because it always is true and the di_mode check moves
into xfs_iget_core because it's only needed there.
xfs_set_inodeops and xfs_revalidate_inode are merged into xfs_setup_inode
and the whole things is moved into xfs_iops.c where it belongs.
SGI-PV: 981498
SGI-Modid: xfs-linux-melb:xfs-kern:31782a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r-- | fs/xfs/xfs_inode.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 19e7a7b82703..5bb638b445e8 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -1046,7 +1046,6 @@ xfs_ialloc( | |||
1046 | { | 1046 | { |
1047 | xfs_ino_t ino; | 1047 | xfs_ino_t ino; |
1048 | xfs_inode_t *ip; | 1048 | xfs_inode_t *ip; |
1049 | struct inode *vp; | ||
1050 | uint flags; | 1049 | uint flags; |
1051 | int error; | 1050 | int error; |
1052 | 1051 | ||
@@ -1077,7 +1076,6 @@ xfs_ialloc( | |||
1077 | } | 1076 | } |
1078 | ASSERT(ip != NULL); | 1077 | ASSERT(ip != NULL); |
1079 | 1078 | ||
1080 | vp = VFS_I(ip); | ||
1081 | ip->i_d.di_mode = (__uint16_t)mode; | 1079 | ip->i_d.di_mode = (__uint16_t)mode; |
1082 | ip->i_d.di_onlink = 0; | 1080 | ip->i_d.di_onlink = 0; |
1083 | ip->i_d.di_nlink = nlink; | 1081 | ip->i_d.di_nlink = nlink; |
@@ -1220,7 +1218,7 @@ xfs_ialloc( | |||
1220 | xfs_trans_log_inode(tp, ip, flags); | 1218 | xfs_trans_log_inode(tp, ip, flags); |
1221 | 1219 | ||
1222 | /* now that we have an i_mode we can setup inode ops and unlock */ | 1220 | /* now that we have an i_mode we can setup inode ops and unlock */ |
1223 | xfs_initialize_vnode(tp->t_mountp, vp, ip); | 1221 | xfs_setup_inode(ip); |
1224 | 1222 | ||
1225 | *ipp = ip; | 1223 | *ipp = ip; |
1226 | return 0; | 1224 | return 0; |