From 7f51350ae82c1874c1318c82a36cf6ea02ade5bc Mon Sep 17 00:00:00 2001 From: Al Viro Date: Mon, 25 Jul 2011 20:54:24 -0400 Subject: [PATCH] --- yaml --- r: 260721 b: refs/heads/master c: 03209378b4b25775bf5e6a86e86f074a1057a439 h: refs/heads/master i: 260719: 0f84f96cdeb6bb5871031352eb5989249b3efcf1 v: v3 --- [refs] | 2 +- trunk/fs/xfs/linux-2.6/xfs_ioctl.c | 2 +- trunk/fs/xfs/xfs_filestream.c | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 5fb783e82d72..e2e57e7968e6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: abbede1b3a680e108d61aaa415ce5153296e775d +refs/heads/master: 03209378b4b25775bf5e6a86e86f074a1057a439 diff --git a/trunk/fs/xfs/linux-2.6/xfs_ioctl.c b/trunk/fs/xfs/linux-2.6/xfs_ioctl.c index 14fc00e32f6b..f7ce7debe14c 100644 --- a/trunk/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/trunk/fs/xfs/linux-2.6/xfs_ioctl.c @@ -265,7 +265,7 @@ xfs_open_by_handle( return PTR_ERR(filp); } - if (inode->i_mode & S_IFREG) { + if (S_ISREG(inode->i_mode)) { filp->f_flags |= O_NOATIME; filp->f_mode |= FMODE_NOCMTIME; } diff --git a/trunk/fs/xfs/xfs_filestream.c b/trunk/fs/xfs/xfs_filestream.c index 87fceceee2db..3ff3d9e23ded 100644 --- a/trunk/fs/xfs/xfs_filestream.c +++ b/trunk/fs/xfs/xfs_filestream.c @@ -345,8 +345,8 @@ _xfs_filestream_update_ag( * directory and pip is NULL. */ ASSERT(ip && ((S_ISREG(ip->i_d.di_mode) && pip && - (pip->i_d.di_mode & S_IFDIR)) || - ((ip->i_d.di_mode & S_IFDIR) && !pip))); + S_ISDIR(pip->i_d.di_mode)) || + (S_ISDIR(ip->i_d.di_mode) && !pip))); mp = ip->i_mount; cache = mp->m_filestream; @@ -537,7 +537,7 @@ xfs_filestream_lookup_ag( xfs_agnumber_t ag; int ref; - if (!(ip->i_d.di_mode & (S_IFREG | S_IFDIR))) { + if (!S_ISREG(ip->i_d.di_mode) && !S_ISDIR(ip->i_d.di_mode)) { ASSERT(0); return NULLAGNUMBER; } @@ -579,9 +579,9 @@ xfs_filestream_associate( xfs_agnumber_t ag, rotorstep, startag; int err = 0; - ASSERT(pip->i_d.di_mode & S_IFDIR); - ASSERT(ip->i_d.di_mode & S_IFREG); - if (!(pip->i_d.di_mode & S_IFDIR) || !(ip->i_d.di_mode & S_IFREG)) + ASSERT(S_ISDIR(pip->i_d.di_mode)); + ASSERT(S_ISREG(ip->i_d.di_mode)); + if (!S_ISDIR(pip->i_d.di_mode) || !S_ISREG(ip->i_d.di_mode)) return -EINVAL; mp = pip->i_mount;