summaryrefslogtreecommitdiffstats
path: root/fs/orangefs/orangefs-utils.c
diff options
context:
space:
mode:
authorMartin Brandenburg <martin@omnibond.com>2016-02-05 22:37:00 +0100
committerMike Marshall <hubcap@omnibond.com>2016-02-19 19:45:53 +0100
commitcf22644a0e5f1a66c61e90da15784effe3ba7ced (patch)
tree7bd88a197d85cdffe4bbc3114234773be0af3031 /fs/orangefs/orangefs-utils.c
parentorangefs: delay freeing slot until cancel completes (diff)
downloadlinux-cf22644a0e5f1a66c61e90da15784effe3ba7ced.tar.xz
linux-cf22644a0e5f1a66c61e90da15784effe3ba7ced.zip
orangefs: use S_ISREG(mode) and friends instead of mode & S_IFREG.
Suggestion from Dan Carpenter. Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs/orangefs-utils.c')
-rw-r--r--fs/orangefs/orangefs-utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/orangefs/orangefs-utils.c b/fs/orangefs/orangefs-utils.c
index 08f9c2dab0fe..63e8c9bc912e 100644
--- a/fs/orangefs/orangefs-utils.c
+++ b/fs/orangefs/orangefs-utils.c
@@ -428,17 +428,17 @@ static int compare_attributes_to_inode(struct inode *inode,
switch (attrs->objtype) {
case ORANGEFS_TYPE_METAFILE:
- if (!(inode->i_mode & S_IFREG))
+ if (!S_ISREG(inode->i_mode))
return 0;
break;
case ORANGEFS_TYPE_DIRECTORY:
- if (!(inode->i_mode & S_IFDIR))
+ if (!S_ISDIR(inode->i_mode))
return 0;
if (inode->i_nlink != 1)
return 0;
break;
case ORANGEFS_TYPE_SYMLINK:
- if (!(inode->i_mode & S_IFLNK))
+ if (!S_ISLNK(inode->i_mode))
return 0;
if (orangefs_inode && symname &&
mask & ORANGEFS_ATTR_SYS_LNK_TARGET)