提交 dbc816d0 编写于 作者: M Miklos Szeredi

ovl: clear nlink on rmdir

To make delete notification work on fa/inotify.
Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
上级 76bc8e28
......@@ -696,8 +696,12 @@ static int ovl_do_remove(struct dentry *dentry, bool is_dir)
else
err = ovl_remove_and_whiteout(dentry, is_dir);
revert_creds(old_cred);
if (!err && !is_dir)
drop_nlink(dentry->d_inode);
if (!err) {
if (is_dir)
clear_nlink(dentry->d_inode);
else
drop_nlink(dentry->d_inode);
}
out_drop_write:
ovl_drop_write(dentry);
out:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册