diff options
author | Martin Brandenburg <martin@omnibond.com> | 2016-02-05 16:37:00 -0500 |
---|---|---|
committer | Mike Marshall <hubcap@omnibond.com> | 2016-02-19 13:45:53 -0500 |
commit | cf22644a0e5f1a66c61e90da15784effe3ba7ced (patch) | |
tree | 7bd88a197d85cdffe4bbc3114234773be0af3031 /fs/orangefs | |
parent | 78699e29fd784a4613d254a22627f336c55c4a76 (diff) |
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')
-rw-r--r-- | fs/orangefs/orangefs-utils.c | 6 |
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, | |||
428 | 428 | ||
429 | switch (attrs->objtype) { | 429 | switch (attrs->objtype) { |
430 | case ORANGEFS_TYPE_METAFILE: | 430 | case ORANGEFS_TYPE_METAFILE: |
431 | if (!(inode->i_mode & S_IFREG)) | 431 | if (!S_ISREG(inode->i_mode)) |
432 | return 0; | 432 | return 0; |
433 | break; | 433 | break; |
434 | case ORANGEFS_TYPE_DIRECTORY: | 434 | case ORANGEFS_TYPE_DIRECTORY: |
435 | if (!(inode->i_mode & S_IFDIR)) | 435 | if (!S_ISDIR(inode->i_mode)) |
436 | return 0; | 436 | return 0; |
437 | if (inode->i_nlink != 1) | 437 | if (inode->i_nlink != 1) |
438 | return 0; | 438 | return 0; |
439 | break; | 439 | break; |
440 | case ORANGEFS_TYPE_SYMLINK: | 440 | case ORANGEFS_TYPE_SYMLINK: |
441 | if (!(inode->i_mode & S_IFLNK)) | 441 | if (!S_ISLNK(inode->i_mode)) |
442 | return 0; | 442 | return 0; |
443 | if (orangefs_inode && symname && | 443 | if (orangefs_inode && symname && |
444 | mask & ORANGEFS_ATTR_SYS_LNK_TARGET) | 444 | mask & ORANGEFS_ATTR_SYS_LNK_TARGET) |