Commit dbc816d0 authored by Miklos Szeredi's avatar Miklos Szeredi

ovl: clear nlink on rmdir

To make delete notification work on fa/inotify.
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent 76bc8e28
...@@ -696,8 +696,12 @@ static int ovl_do_remove(struct dentry *dentry, bool is_dir) ...@@ -696,8 +696,12 @@ static int ovl_do_remove(struct dentry *dentry, bool is_dir)
else else
err = ovl_remove_and_whiteout(dentry, is_dir); err = ovl_remove_and_whiteout(dentry, is_dir);
revert_creds(old_cred); revert_creds(old_cred);
if (!err && !is_dir) if (!err) {
if (is_dir)
clear_nlink(dentry->d_inode);
else
drop_nlink(dentry->d_inode); drop_nlink(dentry->d_inode);
}
out_drop_write: out_drop_write:
ovl_drop_write(dentry); ovl_drop_write(dentry);
out: out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment