diff options
Diffstat (limited to 'fs/xfs/xfs_bmap.c')
-rw-r--r-- | fs/xfs/xfs_bmap.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index c51a3f903633..ab3e5c6c4642 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c | |||
@@ -414,7 +414,7 @@ xfs_bmap_add_attrfork_local( | |||
414 | 414 | ||
415 | if (ip->i_df.if_bytes <= XFS_IFORK_DSIZE(ip)) | 415 | if (ip->i_df.if_bytes <= XFS_IFORK_DSIZE(ip)) |
416 | return 0; | 416 | return 0; |
417 | if ((ip->i_d.di_mode & S_IFMT) == S_IFDIR) { | 417 | if (S_ISDIR(ip->i_d.di_mode)) { |
418 | mp = ip->i_mount; | 418 | mp = ip->i_mount; |
419 | memset(&dargs, 0, sizeof(dargs)); | 419 | memset(&dargs, 0, sizeof(dargs)); |
420 | dargs.dp = ip; | 420 | dargs.dp = ip; |
@@ -3344,8 +3344,7 @@ xfs_bmap_local_to_extents( | |||
3344 | * We don't want to deal with the case of keeping inode data inline yet. | 3344 | * We don't want to deal with the case of keeping inode data inline yet. |
3345 | * So sending the data fork of a regular inode is invalid. | 3345 | * So sending the data fork of a regular inode is invalid. |
3346 | */ | 3346 | */ |
3347 | ASSERT(!((ip->i_d.di_mode & S_IFMT) == S_IFREG && | 3347 | ASSERT(!(S_ISREG(ip->i_d.di_mode) && whichfork == XFS_DATA_FORK)); |
3348 | whichfork == XFS_DATA_FORK)); | ||
3349 | ifp = XFS_IFORK_PTR(ip, whichfork); | 3348 | ifp = XFS_IFORK_PTR(ip, whichfork); |
3350 | ASSERT(XFS_IFORK_FORMAT(ip, whichfork) == XFS_DINODE_FMT_LOCAL); | 3349 | ASSERT(XFS_IFORK_FORMAT(ip, whichfork) == XFS_DINODE_FMT_LOCAL); |
3351 | flags = 0; | 3350 | flags = 0; |
@@ -4052,7 +4051,7 @@ xfs_bmap_one_block( | |||
4052 | 4051 | ||
4053 | #ifndef DEBUG | 4052 | #ifndef DEBUG |
4054 | if (whichfork == XFS_DATA_FORK) { | 4053 | if (whichfork == XFS_DATA_FORK) { |
4055 | return ((ip->i_d.di_mode & S_IFMT) == S_IFREG) ? | 4054 | return S_ISREG(ip->i_d.di_mode) ? |
4056 | (ip->i_size == ip->i_mount->m_sb.sb_blocksize) : | 4055 | (ip->i_size == ip->i_mount->m_sb.sb_blocksize) : |
4057 | (ip->i_d.di_size == ip->i_mount->m_sb.sb_blocksize); | 4056 | (ip->i_d.di_size == ip->i_mount->m_sb.sb_blocksize); |
4058 | } | 4057 | } |