aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2008-12-03 06:20:32 -0500
committerNiv Sardi <xaiki@sgi.com>2008-12-03 23:39:22 -0500
commit6bd16ff27060819d16b3e7abe59b6644b349aea3 (patch)
tree6a7250063b8d727f35887bfe188a4dc7802fa181 /fs
parent5efcbb853bc2f051d720a191268f8dd901fea9c2 (diff)
kill dead inode flags
There are a few inode flags around that aren't used anywhere, so remove them. Also update xfsidbg to display all used inode flags correctly. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Niv Sardi <xaiki@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/linux-2.6/xfs_aops.c11
-rw-r--r--fs/xfs/linux-2.6/xfs_file.c10
-rw-r--r--fs/xfs/linux-2.6/xfs_iops.c5
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c1
-rw-r--r--fs/xfs/xfs_iget.c1
-rw-r--r--fs/xfs/xfs_inode.h17
6 files changed, 11 insertions, 34 deletions
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c
index 8fbc97df3609..bb224d07e1ef 100644
--- a/fs/xfs/linux-2.6/xfs_aops.c
+++ b/fs/xfs/linux-2.6/xfs_aops.c
@@ -317,14 +317,9 @@ xfs_map_blocks(
317 xfs_iomap_t *mapp, 317 xfs_iomap_t *mapp,
318 int flags) 318 int flags)
319{ 319{
320 xfs_inode_t *ip = XFS_I(inode); 320 int nmaps = 1;
321 int error, nmaps = 1; 321
322 322 return -xfs_iomap(XFS_I(inode), offset, count, flags, mapp, &nmaps);
323 error = xfs_iomap(ip, offset, count,
324 flags, mapp, &nmaps);
325 if (!error && (flags & (BMAPI_WRITE|BMAPI_ALLOCATE)))
326 xfs_iflags_set(ip, XFS_IMODIFIED);
327 return -error;
328} 323}
329 324
330STATIC_INLINE int 325STATIC_INLINE int
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c
index d377db05d806..f999d20a429c 100644
--- a/fs/xfs/linux-2.6/xfs_file.c
+++ b/fs/xfs/linux-2.6/xfs_file.c
@@ -281,11 +281,8 @@ xfs_file_ioctl(
281 unsigned int cmd, 281 unsigned int cmd,
282 unsigned long p) 282 unsigned long p)
283{ 283{
284 int error;
285 struct inode *inode = filp->f_path.dentry->d_inode; 284 struct inode *inode = filp->f_path.dentry->d_inode;
286 285
287 error = xfs_ioctl(XFS_I(inode), filp, 0, cmd, (void __user *)p);
288 xfs_iflags_set(XFS_I(inode), XFS_IMODIFIED);
289 286
290 /* NOTE: some of the ioctl's return positive #'s as a 287 /* NOTE: some of the ioctl's return positive #'s as a
291 * byte count indicating success, such as 288 * byte count indicating success, such as
@@ -293,7 +290,7 @@ xfs_file_ioctl(
293 * like most other routines. This means true 290 * like most other routines. This means true
294 * errors need to be returned as a negative value. 291 * errors need to be returned as a negative value.
295 */ 292 */
296 return error; 293 return xfs_ioctl(XFS_I(inode), filp, 0, cmd, (void __user *)p);
297} 294}
298 295
299STATIC long 296STATIC long
@@ -302,11 +299,8 @@ xfs_file_ioctl_invis(
302 unsigned int cmd, 299 unsigned int cmd,
303 unsigned long p) 300 unsigned long p)
304{ 301{
305 int error;
306 struct inode *inode = filp->f_path.dentry->d_inode; 302 struct inode *inode = filp->f_path.dentry->d_inode;
307 303
308 error = xfs_ioctl(XFS_I(inode), filp, IO_INVIS, cmd, (void __user *)p);
309 xfs_iflags_set(XFS_I(inode), XFS_IMODIFIED);
310 304
311 /* NOTE: some of the ioctl's return positive #'s as a 305 /* NOTE: some of the ioctl's return positive #'s as a
312 * byte count indicating success, such as 306 * byte count indicating success, such as
@@ -314,7 +308,7 @@ xfs_file_ioctl_invis(
314 * like most other routines. This means true 308 * like most other routines. This means true
315 * errors need to be returned as a negative value. 309 * errors need to be returned as a negative value.
316 */ 310 */
317 return error; 311 return xfs_ioctl(XFS_I(inode), filp, IO_INVIS, cmd, (void __user *)p);
318} 312}
319 313
320/* 314/*
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c
index 76b570dd1ab2..7aa53fefc67f 100644
--- a/fs/xfs/linux-2.6/xfs_iops.c
+++ b/fs/xfs/linux-2.6/xfs_iops.c
@@ -159,8 +159,6 @@ xfs_init_security(
159 } 159 }
160 160
161 error = xfs_attr_set(ip, name, value, length, ATTR_SECURE); 161 error = xfs_attr_set(ip, name, value, length, ATTR_SECURE);
162 if (!error)
163 xfs_iflags_set(ip, XFS_IMODIFIED);
164 162
165 kfree(name); 163 kfree(name);
166 kfree(value); 164 kfree(value);
@@ -261,7 +259,6 @@ xfs_vn_mknod(
261 error = _ACL_INHERIT(inode, mode, default_acl); 259 error = _ACL_INHERIT(inode, mode, default_acl);
262 if (unlikely(error)) 260 if (unlikely(error))
263 goto out_cleanup_inode; 261 goto out_cleanup_inode;
264 xfs_iflags_set(ip, XFS_IMODIFIED);
265 _ACL_FREE(default_acl); 262 _ACL_FREE(default_acl);
266 } 263 }
267 264
@@ -377,7 +374,6 @@ xfs_vn_link(
377 if (unlikely(error)) 374 if (unlikely(error))
378 return -error; 375 return -error;
379 376
380 xfs_iflags_set(XFS_I(dir), XFS_IMODIFIED);
381 atomic_inc(&inode->i_count); 377 atomic_inc(&inode->i_count);
382 d_instantiate(dentry, inode); 378 d_instantiate(dentry, inode);
383 return 0; 379 return 0;
@@ -888,7 +884,6 @@ xfs_setup_inode(
888 inode->i_ctime.tv_sec = ip->i_d.di_ctime.t_sec; 884 inode->i_ctime.tv_sec = ip->i_d.di_ctime.t_sec;
889 inode->i_ctime.tv_nsec = ip->i_d.di_ctime.t_nsec; 885 inode->i_ctime.tv_nsec = ip->i_d.di_ctime.t_nsec;
890 xfs_diflags_to_iflags(inode, ip); 886 xfs_diflags_to_iflags(inode, ip);
891 xfs_iflags_clear(ip, XFS_IMODIFIED);
892 887
893 switch (inode->i_mode & S_IFMT) { 888 switch (inode->i_mode & S_IFMT) {
894 case S_IFREG: 889 case S_IFREG:
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index 5389f077874b..37f2d11be4ac 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -1025,7 +1025,6 @@ xfs_fs_clear_inode(
1025 XFS_STATS_DEC(vn_active); 1025 XFS_STATS_DEC(vn_active);
1026 1026
1027 xfs_inactive(ip); 1027 xfs_inactive(ip);
1028 xfs_iflags_clear(ip, XFS_IMODIFIED);
1029} 1028}
1030 1029
1031STATIC void 1030STATIC void
diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c
index f58e5e000fce..82eb8ed56338 100644
--- a/fs/xfs/xfs_iget.c
+++ b/fs/xfs/xfs_iget.c
@@ -362,7 +362,6 @@ again:
362 } 362 }
363 xfs_put_perag(mp, pag); 363 xfs_put_perag(mp, pag);
364 364
365 xfs_iflags_set(ip, XFS_IMODIFIED);
366 *ipp = ip; 365 *ipp = ip;
367 366
368 ASSERT(ip->i_df.if_ext_max == 367 ASSERT(ip->i_df.if_ext_max ==
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h
index 03ae96bdae7e..ddac1b806c0b 100644
--- a/fs/xfs/xfs_inode.h
+++ b/fs/xfs/xfs_inode.h
@@ -403,17 +403,12 @@ static inline void xfs_ifunlock(xfs_inode_t *ip)
403/* 403/*
404 * In-core inode flags. 404 * In-core inode flags.
405 */ 405 */
406#define XFS_IGRIO 0x0001 /* inode used for guaranteed rate i/o */ 406#define XFS_IRECLAIM 0x0001 /* we have started reclaiming this inode */
407#define XFS_IUIOSZ 0x0002 /* inode i/o sizes have been explicitly set */ 407#define XFS_ISTALE 0x0002 /* inode has been staled */
408#define XFS_IQUIESCE 0x0004 /* we have started quiescing for this inode */ 408#define XFS_IRECLAIMABLE 0x0004 /* inode can be reclaimed */
409#define XFS_IRECLAIM 0x0008 /* we have started reclaiming this inode */ 409#define XFS_INEW 0x0008 /* inode has just been allocated */
410#define XFS_ISTALE 0x0010 /* inode has been staled */ 410#define XFS_IFILESTREAM 0x0010 /* inode is in a filestream directory */
411#define XFS_IRECLAIMABLE 0x0020 /* inode can be reclaimed */ 411#define XFS_ITRUNCATED 0x0020 /* truncated down so flush-on-close */
412#define XFS_INEW 0x0040
413#define XFS_IFILESTREAM 0x0080 /* inode is in a filestream directory */
414#define XFS_IMODIFIED 0x0100 /* XFS inode state possibly differs */
415 /* to the Linux inode state. */
416#define XFS_ITRUNCATED 0x0200 /* truncated down so flush-on-close */
417 412
418/* 413/*
419 * Flags for inode locking. 414 * Flags for inode locking.