aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_filestream.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_filestream.c')
-rw-r--r--fs/xfs/xfs_filestream.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/xfs/xfs_filestream.c b/fs/xfs/xfs_filestream.c
index 9124425b7f2f..3ff3d9e23ded 100644
--- a/fs/xfs/xfs_filestream.c
+++ b/fs/xfs/xfs_filestream.c
@@ -344,9 +344,9 @@ _xfs_filestream_update_ag(
344 * Either ip is a regular file and pip is a directory, or ip is a 344 * Either ip is a regular file and pip is a directory, or ip is a
345 * directory and pip is NULL. 345 * directory and pip is NULL.
346 */ 346 */
347 ASSERT(ip && (((ip->i_d.di_mode & S_IFREG) && pip && 347 ASSERT(ip && ((S_ISREG(ip->i_d.di_mode) && pip &&
348 (pip->i_d.di_mode & S_IFDIR)) || 348 S_ISDIR(pip->i_d.di_mode)) ||
349 ((ip->i_d.di_mode & S_IFDIR) && !pip))); 349 (S_ISDIR(ip->i_d.di_mode) && !pip)));
350 350
351 mp = ip->i_mount; 351 mp = ip->i_mount;
352 cache = mp->m_filestream; 352 cache = mp->m_filestream;
@@ -537,7 +537,7 @@ xfs_filestream_lookup_ag(
537 xfs_agnumber_t ag; 537 xfs_agnumber_t ag;
538 int ref; 538 int ref;
539 539
540 if (!(ip->i_d.di_mode & (S_IFREG | S_IFDIR))) { 540 if (!S_ISREG(ip->i_d.di_mode) && !S_ISDIR(ip->i_d.di_mode)) {
541 ASSERT(0); 541 ASSERT(0);
542 return NULLAGNUMBER; 542 return NULLAGNUMBER;
543 } 543 }
@@ -579,9 +579,9 @@ xfs_filestream_associate(
579 xfs_agnumber_t ag, rotorstep, startag; 579 xfs_agnumber_t ag, rotorstep, startag;
580 int err = 0; 580 int err = 0;
581 581
582 ASSERT(pip->i_d.di_mode & S_IFDIR); 582 ASSERT(S_ISDIR(pip->i_d.di_mode));
583 ASSERT(ip->i_d.di_mode & S_IFREG); 583 ASSERT(S_ISREG(ip->i_d.di_mode));
584 if (!(pip->i_d.di_mode & S_IFDIR) || !(ip->i_d.di_mode & S_IFREG)) 584 if (!S_ISDIR(pip->i_d.di_mode) || !S_ISREG(ip->i_d.di_mode))
585 return -EINVAL; 585 return -EINVAL;
586 586
587 mp = pip->i_mount; 587 mp = pip->i_mount;