diff mbox series

[11/21] nsfs, pidfs: drop the pointless ->d_delete()

Message ID 20250224212051.1756517-11-viro@zeniv.linux.org.uk (mailing list archive)
State New
Headers show
Series [01/21] procfs: kill ->proc_dops | expand

Commit Message

Al Viro Feb. 24, 2025, 9:20 p.m. UTC
No dentries are ever hashed on those, so ->d_delete() wouldn't be
even looked at.  If it's unhashed, we are not retaining it in dcache
once the refcount hits zero, no matter what.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 fs/nsfs.c  | 1 -
 fs/pidfs.c | 1 -
 2 files changed, 2 deletions(-)

Comments

Christian Brauner Feb. 26, 2025, 8:37 a.m. UTC | #1
On Mon, Feb 24, 2025 at 09:20:41PM +0000, Al Viro wrote:
> No dentries are ever hashed on those, so ->d_delete() wouldn't be
> even looked at.  If it's unhashed, we are not retaining it in dcache
> once the refcount hits zero, no matter what.
> 
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---

Patches to remove this have already been merged into mainline.

>  fs/nsfs.c  | 1 -
>  fs/pidfs.c | 1 -
>  2 files changed, 2 deletions(-)
> 
> diff --git a/fs/nsfs.c b/fs/nsfs.c
> index 663f8656158d..f7fddf8ecf73 100644
> --- a/fs/nsfs.c
> +++ b/fs/nsfs.c
> @@ -37,7 +37,6 @@ static char *ns_dname(struct dentry *dentry, char *buffer, int buflen)
>  }
>  
>  const struct dentry_operations ns_dentry_operations = {
> -	.d_delete	= always_delete_dentry,
>  	.d_dname	= ns_dname,
>  	.d_prune	= stashed_dentry_prune,
>  };
> diff --git a/fs/pidfs.c b/fs/pidfs.c
> index 63f9699ebac3..c0478b3c55d9 100644
> --- a/fs/pidfs.c
> +++ b/fs/pidfs.c
> @@ -521,7 +521,6 @@ static char *pidfs_dname(struct dentry *dentry, char *buffer, int buflen)
>  }
>  
>  const struct dentry_operations pidfs_dentry_operations = {
> -	.d_delete	= always_delete_dentry,
>  	.d_dname	= pidfs_dname,
>  	.d_prune	= stashed_dentry_prune,
>  };
> -- 
> 2.39.5
>
diff mbox series

Patch

diff --git a/fs/nsfs.c b/fs/nsfs.c
index 663f8656158d..f7fddf8ecf73 100644
--- a/fs/nsfs.c
+++ b/fs/nsfs.c
@@ -37,7 +37,6 @@  static char *ns_dname(struct dentry *dentry, char *buffer, int buflen)
 }
 
 const struct dentry_operations ns_dentry_operations = {
-	.d_delete	= always_delete_dentry,
 	.d_dname	= ns_dname,
 	.d_prune	= stashed_dentry_prune,
 };
diff --git a/fs/pidfs.c b/fs/pidfs.c
index 63f9699ebac3..c0478b3c55d9 100644
--- a/fs/pidfs.c
+++ b/fs/pidfs.c
@@ -521,7 +521,6 @@  static char *pidfs_dname(struct dentry *dentry, char *buffer, int buflen)
 }
 
 const struct dentry_operations pidfs_dentry_operations = {
-	.d_delete	= always_delete_dentry,
 	.d_dname	= pidfs_dname,
 	.d_prune	= stashed_dentry_prune,
 };