projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1973a12
)
autofs: add WARN_ON(1) for non dir/link inode case
author
Tomohiro Kusumi
<
[email protected]
>
Tue, 11 Oct 2016 20:52:36 +0000
(13:52 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 11 Oct 2016 22:06:31 +0000
(15:06 -0700)
It's invalid if the given mode is neither dir nor link, so warn on else
case.
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Tomohiro Kusumi <
[email protected]
>
Signed-off-by: Ian Kent <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
fs/autofs4/inode.c
patch
|
blob
|
history
diff --git
a/fs/autofs4/inode.c
b/fs/autofs4/inode.c
index 3f486c1f5f43a1c6e600fa5a84cf837f50823a41..a61521eaf11396c1a6500ed5e11b0a12517823ef 100644
(file)
--- a/
fs/autofs4/inode.c
+++ b/
fs/autofs4/inode.c
@@
-368,7
+368,8
@@
struct inode *autofs4_get_inode(struct super_block *sb, umode_t mode)
inode->i_fop = &autofs4_dir_operations;
} else if (S_ISLNK(mode)) {
inode->i_op = &autofs4_symlink_inode_operations;
- }
+ } else
+ WARN_ON(1);
return inode;
}