nfsd: fsnotify on rmdir under nfsd/clients/
diff mbox series

Message ID 20200319153038.GA2624@fieldses.org
State New
Headers show
Series
  • nfsd: fsnotify on rmdir under nfsd/clients/
Related show

Commit Message

J. Bruce Fields March 19, 2020, 3:30 p.m. UTC
From: "J. Bruce Fields" <bfields@redhat.com>

Userspace should be able to monitor nfsd/clients/ to see when clients
come and go, but we're failing to send fsnotify events.

Cc: stable@kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
---
 fs/nfsd/nfsctl.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Chuck Lever March 19, 2020, 3:35 p.m. UTC | #1
> On Mar 19, 2020, at 11:30 AM, bfields@fieldses.org wrote:
> 
> From: "J. Bruce Fields" <bfields@redhat.com>
> 
> Userspace should be able to monitor nfsd/clients/ to see when clients
> come and go, but we're failing to send fsnotify events.
> 
> Cc: stable@kernel.org
> Signed-off-by: J. Bruce Fields <bfields@redhat.com>

Applied to nfsd-5.7, thanks!


> ---
> fs/nfsd/nfsctl.c | 1 +
> 1 file changed, 1 insertion(+)
> 
> diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
> index e109a1007704..3bb2db947d29 100644
> --- a/fs/nfsd/nfsctl.c
> +++ b/fs/nfsd/nfsctl.c
> @@ -1333,6 +1333,7 @@ void nfsd_client_rmdir(struct dentry *dentry)
> 	dget(dentry);
> 	ret = simple_rmdir(dir, dentry);
> 	WARN_ON_ONCE(ret);
> +	fsnotify_rmdir(dir, dentry);
> 	d_delete(dentry);
> 	inode_unlock(dir);
> }
> -- 
> 2.25.1
> 

--
Chuck Lever

Patch
diff mbox series

diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index e109a1007704..3bb2db947d29 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -1333,6 +1333,7 @@  void nfsd_client_rmdir(struct dentry *dentry)
 	dget(dentry);
 	ret = simple_rmdir(dir, dentry);
 	WARN_ON_ONCE(ret);
+	fsnotify_rmdir(dir, dentry);
 	d_delete(dentry);
 	inode_unlock(dir);
 }