projects
/
wrapfs-4.13.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
07c8da0
)
Wrapfs: drop our dentry in ->rmdir
author
Erez Zadok
<ezk@cs.sunysb.edu>
Fri, 9 Sep 2011 04:47:49 +0000
(
00:47
-0400)
committer
Rohit Kumar
<rokkumar@cs.stonybrook.edu>
Fri, 12 Oct 2018 16:28:06 +0000
(12:28 -0400)
Also clear nlinks on our inode.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/wrapfs/inode.c
patch
|
blob
|
history
diff --git
a/fs/wrapfs/inode.c
b/fs/wrapfs/inode.c
index 47759a5a26020181ea7962b452edc6642593a3b1..9586b0112b7be4cee276b262f41792f26e5893ab 100644
(file)
--- a/
fs/wrapfs/inode.c
+++ b/
fs/wrapfs/inode.c
@@
-223,6
+223,9
@@
static int wrapfs_rmdir(struct inode *dir, struct dentry *dentry)
if (err)
goto out;
+ d_drop(dentry); /* drop our dentry on success (why not VFS's job?) */
+ if (dentry->d_inode)
+ clear_nlink(dentry->d_inode);
fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode);
fsstack_copy_inode_size(dir, lower_dir_dentry->d_inode);
dir->i_nlink = lower_dir_dentry->d_inode->i_nlink;