diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_vnode.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_vnode.c | 72 |
1 files changed, 2 insertions, 70 deletions
diff --git a/fs/xfs/linux-2.6/xfs_vnode.c b/fs/xfs/linux-2.6/xfs_vnode.c index bc7afe007338..b52528bbbfff 100644 --- a/fs/xfs/linux-2.6/xfs_vnode.c +++ b/fs/xfs/linux-2.6/xfs_vnode.c | |||
@@ -33,7 +33,7 @@ | |||
33 | 33 | ||
34 | 34 | ||
35 | /* | 35 | /* |
36 | * Dedicated vnode inactive/reclaim sync semaphores. | 36 | * Dedicated vnode inactive/reclaim sync wait queues. |
37 | * Prime number of hash buckets since address is used as the key. | 37 | * Prime number of hash buckets since address is used as the key. |
38 | */ | 38 | */ |
39 | #define NVSYNC 37 | 39 | #define NVSYNC 37 |
@@ -82,74 +82,6 @@ vn_ioerror( | |||
82 | xfs_do_force_shutdown(ip->i_mount, SHUTDOWN_DEVICE_REQ, f, l); | 82 | xfs_do_force_shutdown(ip->i_mount, SHUTDOWN_DEVICE_REQ, f, l); |
83 | } | 83 | } |
84 | 84 | ||
85 | /* | ||
86 | * Revalidate the Linux inode from the XFS inode. | ||
87 | * Note: i_size _not_ updated; we must hold the inode | ||
88 | * semaphore when doing that - callers responsibility. | ||
89 | */ | ||
90 | int | ||
91 | vn_revalidate( | ||
92 | bhv_vnode_t *vp) | ||
93 | { | ||
94 | struct inode *inode = vn_to_inode(vp); | ||
95 | struct xfs_inode *ip = XFS_I(inode); | ||
96 | struct xfs_mount *mp = ip->i_mount; | ||
97 | unsigned long xflags; | ||
98 | |||
99 | xfs_itrace_entry(ip); | ||
100 | |||
101 | if (XFS_FORCED_SHUTDOWN(mp)) | ||
102 | return -EIO; | ||
103 | |||
104 | xfs_ilock(ip, XFS_ILOCK_SHARED); | ||
105 | inode->i_mode = ip->i_d.di_mode; | ||
106 | inode->i_uid = ip->i_d.di_uid; | ||
107 | inode->i_gid = ip->i_d.di_gid; | ||
108 | inode->i_mtime.tv_sec = ip->i_d.di_mtime.t_sec; | ||
109 | inode->i_mtime.tv_nsec = ip->i_d.di_mtime.t_nsec; | ||
110 | inode->i_ctime.tv_sec = ip->i_d.di_ctime.t_sec; | ||
111 | inode->i_ctime.tv_nsec = ip->i_d.di_ctime.t_nsec; | ||
112 | |||
113 | xflags = xfs_ip2xflags(ip); | ||
114 | if (xflags & XFS_XFLAG_IMMUTABLE) | ||
115 | inode->i_flags |= S_IMMUTABLE; | ||
116 | else | ||
117 | inode->i_flags &= ~S_IMMUTABLE; | ||
118 | if (xflags & XFS_XFLAG_APPEND) | ||
119 | inode->i_flags |= S_APPEND; | ||
120 | else | ||
121 | inode->i_flags &= ~S_APPEND; | ||
122 | if (xflags & XFS_XFLAG_SYNC) | ||
123 | inode->i_flags |= S_SYNC; | ||
124 | else | ||
125 | inode->i_flags &= ~S_SYNC; | ||
126 | if (xflags & XFS_XFLAG_NOATIME) | ||
127 | inode->i_flags |= S_NOATIME; | ||
128 | else | ||
129 | inode->i_flags &= ~S_NOATIME; | ||
130 | xfs_iunlock(ip, XFS_ILOCK_SHARED); | ||
131 | |||
132 | xfs_iflags_clear(ip, XFS_IMODIFIED); | ||
133 | return 0; | ||
134 | } | ||
135 | |||
136 | /* | ||
137 | * Add a reference to a referenced vnode. | ||
138 | */ | ||
139 | bhv_vnode_t * | ||
140 | vn_hold( | ||
141 | bhv_vnode_t *vp) | ||
142 | { | ||
143 | struct inode *inode; | ||
144 | |||
145 | XFS_STATS_INC(vn_hold); | ||
146 | |||
147 | inode = igrab(vn_to_inode(vp)); | ||
148 | ASSERT(inode); | ||
149 | |||
150 | return vp; | ||
151 | } | ||
152 | |||
153 | #ifdef XFS_INODE_TRACE | 85 | #ifdef XFS_INODE_TRACE |
154 | 86 | ||
155 | /* | 87 | /* |
@@ -158,7 +90,7 @@ vn_hold( | |||
158 | */ | 90 | */ |
159 | static inline int xfs_icount(struct xfs_inode *ip) | 91 | static inline int xfs_icount(struct xfs_inode *ip) |
160 | { | 92 | { |
161 | bhv_vnode_t *vp = XFS_ITOV_NULL(ip); | 93 | struct inode *vp = VFS_I(ip); |
162 | 94 | ||
163 | if (vp) | 95 | if (vp) |
164 | return vn_count(vp); | 96 | return vn_count(vp); |