projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78699e2
)
orangefs: use S_ISREG(mode) and friends instead of mode & S_IFREG.
author
Martin Brandenburg
<martin@omnibond.com>
Fri, 5 Feb 2016 21:37:00 +0000
(16:37 -0500)
committer
Mike Marshall
<hubcap@omnibond.com>
Fri, 19 Feb 2016 18:45:53 +0000
(13:45 -0500)
Suggestion from Dan Carpenter.
Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
fs/orangefs/orangefs-utils.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/orangefs/orangefs-utils.c
b/fs/orangefs/orangefs-utils.c
index 08f9c2dab0fe46856cb8203f0b8bb9ad11b7be1f..63e8c9bc912e2d9a4aee88640453e1ed7231eb97 100644
(file)
--- 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)