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:
0a73d0a
)
fix a braino in ovl_d_select_inode()
author
Al Viro
<
[email protected]
>
Sun, 12 Jul 2015 14:39:45 +0000
(10:39 -0400)
committer
Al Viro
<
[email protected]
>
Sun, 12 Jul 2015 15:22:05 +0000
(11:22 -0400)
when opening a directory we want the overlayfs inode, not one from
the topmost layer.
Reported-By: Andrey Jr. Melnikov <
[email protected]
>
Tested-By: Andrey Jr. Melnikov <
[email protected]
>
Signed-off-by: Al Viro <
[email protected]
>
fs/overlayfs/inode.c
patch
|
blob
|
history
diff --git
a/fs/overlayfs/inode.c
b/fs/overlayfs/inode.c
index f140e3dbfb7bdeb967cad4639c9e32c236a3cced..d9da5a4e93821ddbee9f2fb449666c207417e523 100644
(file)
--- a/
fs/overlayfs/inode.c
+++ b/
fs/overlayfs/inode.c
@@
-343,6
+343,9
@@
struct inode *ovl_d_select_inode(struct dentry *dentry, unsigned file_flags)
struct path realpath;
enum ovl_path_type type;
+ if (d_is_dir(dentry))
+ return d_backing_inode(dentry);
+
type = ovl_path_real(dentry, &realpath);
if (ovl_open_need_copy_up(file_flags, type, realpath.dentry)) {
err = ovl_want_write(dentry);