diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2016-07-29 12:05:24 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2016-07-29 12:05:24 +0200 |
commit | dbc816d05ddcfb189af8784d04fc84c812db3747 (patch) | |
tree | 30849c8e9451fb8031a2bce60eccc74cb807c605 /fs/overlayfs | |
parent | 76bc8e2843b66f8205026365966b49ec6da39ae7 (diff) |
ovl: clear nlink on rmdir
To make delete notification work on fa/inotify.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs')
-rw-r--r-- | fs/overlayfs/dir.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c index 8f95c213c0c6..ddda948109d3 100644 --- a/fs/overlayfs/dir.c +++ b/fs/overlayfs/dir.c @@ -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: |