diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-26 02:31:30 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-26 15:05:16 -0400 |
commit | abbede1b3a680e108d61aaa415ce5153296e775d (patch) | |
tree | 0fb8b8db864e5919b02f5d7dd2d66474e76a39d5 /fs/xfs/xfs_vnodeops.c | |
parent | c46c887744b330795eba55fdb96343c36d481765 (diff) |
xfs: get rid of open-coded S_ISREG(), etc.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
-rw-r--r-- | fs/xfs/xfs_vnodeops.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 88d121486c52..9322e13f0c63 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c | |||
@@ -121,7 +121,7 @@ xfs_readlink( | |||
121 | 121 | ||
122 | xfs_ilock(ip, XFS_ILOCK_SHARED); | 122 | xfs_ilock(ip, XFS_ILOCK_SHARED); |
123 | 123 | ||
124 | ASSERT((ip->i_d.di_mode & S_IFMT) == S_IFLNK); | 124 | ASSERT(S_ISLNK(ip->i_d.di_mode)); |
125 | ASSERT(ip->i_d.di_size <= MAXPATHLEN); | 125 | ASSERT(ip->i_d.di_size <= MAXPATHLEN); |
126 | 126 | ||
127 | pathlen = ip->i_d.di_size; | 127 | pathlen = ip->i_d.di_size; |
@@ -529,7 +529,7 @@ xfs_release( | |||
529 | if (ip->i_d.di_nlink == 0) | 529 | if (ip->i_d.di_nlink == 0) |
530 | return 0; | 530 | return 0; |
531 | 531 | ||
532 | if ((((ip->i_d.di_mode & S_IFMT) == S_IFREG) && | 532 | if ((S_ISREG(ip->i_d.di_mode) && |
533 | ((ip->i_size > 0) || (VN_CACHED(VFS_I(ip)) > 0 || | 533 | ((ip->i_size > 0) || (VN_CACHED(VFS_I(ip)) > 0 || |
534 | ip->i_delayed_blks > 0)) && | 534 | ip->i_delayed_blks > 0)) && |
535 | (ip->i_df.if_flags & XFS_IFEXTENTS)) && | 535 | (ip->i_df.if_flags & XFS_IFEXTENTS)) && |
@@ -610,7 +610,7 @@ xfs_inactive( | |||
610 | truncate = ((ip->i_d.di_nlink == 0) && | 610 | truncate = ((ip->i_d.di_nlink == 0) && |
611 | ((ip->i_d.di_size != 0) || (ip->i_size != 0) || | 611 | ((ip->i_d.di_size != 0) || (ip->i_size != 0) || |
612 | (ip->i_d.di_nextents > 0) || (ip->i_delayed_blks > 0)) && | 612 | (ip->i_d.di_nextents > 0) || (ip->i_delayed_blks > 0)) && |
613 | ((ip->i_d.di_mode & S_IFMT) == S_IFREG)); | 613 | S_ISREG(ip->i_d.di_mode)); |
614 | 614 | ||
615 | mp = ip->i_mount; | 615 | mp = ip->i_mount; |
616 | 616 | ||
@@ -621,7 +621,7 @@ xfs_inactive( | |||
621 | goto out; | 621 | goto out; |
622 | 622 | ||
623 | if (ip->i_d.di_nlink != 0) { | 623 | if (ip->i_d.di_nlink != 0) { |
624 | if ((((ip->i_d.di_mode & S_IFMT) == S_IFREG) && | 624 | if ((S_ISREG(ip->i_d.di_mode) && |
625 | ((ip->i_size > 0) || (VN_CACHED(VFS_I(ip)) > 0 || | 625 | ((ip->i_size > 0) || (VN_CACHED(VFS_I(ip)) > 0 || |
626 | ip->i_delayed_blks > 0)) && | 626 | ip->i_delayed_blks > 0)) && |
627 | (ip->i_df.if_flags & XFS_IFEXTENTS) && | 627 | (ip->i_df.if_flags & XFS_IFEXTENTS) && |
@@ -669,7 +669,7 @@ xfs_inactive( | |||
669 | xfs_iunlock(ip, XFS_IOLOCK_EXCL | XFS_ILOCK_EXCL); | 669 | xfs_iunlock(ip, XFS_IOLOCK_EXCL | XFS_ILOCK_EXCL); |
670 | return VN_INACTIVE_CACHE; | 670 | return VN_INACTIVE_CACHE; |
671 | } | 671 | } |
672 | } else if ((ip->i_d.di_mode & S_IFMT) == S_IFLNK) { | 672 | } else if (S_ISLNK(ip->i_d.di_mode)) { |
673 | 673 | ||
674 | /* | 674 | /* |
675 | * If we get an error while cleaning up a | 675 | * If we get an error while cleaning up a |