projects
/
GitHub
/
moto-9609
/
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:
569254b
)
omfs: fix (mode & S_IFDIR) abuse
author
Al Viro
<viro@zeniv.linux.org.uk>
Tue, 26 Jul 2011 06:34:33 +0000
(
02:34
-0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Tue, 26 Jul 2011 17:05:28 +0000
(13:05 -0400)
granted, on a filesystem that has only regular files and directories
it happens to work, but really should be S_ISDIR(mode)...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/omfs/dir.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/omfs/dir.c
b/fs/omfs/dir.c
index 3b8d3979e03b69230dd1991c9f69c0d49344cca9..98e544274390b8caaef45d29f05722aed6663b40 100644
(file)
--- a/
fs/omfs/dir.c
+++ b/
fs/omfs/dir.c
@@
-93,7
+93,7
@@
int omfs_make_empty(struct inode *inode, struct super_block *sb)
memset(bh->b_data, 0, sizeof(struct omfs_inode));
- if (
inode->i_mode & S_IFDIR
) {
+ if (
S_ISDIR(inode->i_mode)
) {
memset(&bh->b_data[OMFS_DIR_START], 0xff,
sbi->s_sys_blocksize - OMFS_DIR_START);
} else