Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dbc816d0 authored by Miklos Szeredi's avatar Miklos Szeredi
Browse files

ovl: clear nlink on rmdir



To make delete notification work on fa/inotify.

Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent 76bc8e28
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -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: