[External] : [PATCH v2 07/50] convert simple_{link,unlink,rmdir,rename,fill_super}() to new primitives

Mark Tinguely mark.tinguely at oracle.com
Thu Oct 30 01:02:33 AEDT 2025


On 10/27/25 7:45 PM, Al Viro wrote:
> Note that simple_unlink() et.al. are used by many filesystems; for now
> they can not assume that persistency mark will have been set back
> when the object got created.  Once all conversions are done we'll
> have them complain if called for something that had not been marked
> persistent.
> 
> Signed-off-by: Al Viro <viro at zeniv.linux.org.uk>
> ---
>   fs/libfs.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/libfs.c b/fs/libfs.c
> index a033f35493d0..80f288a771e3 100644
> --- a/fs/libfs.c
> +++ b/fs/libfs.c

...

>   EXPORT_SYMBOL(simple_unlink);
> @@ -1078,7 +1077,8 @@ int simple_fill_super(struct super_block *s, unsigned long magic,
>   		simple_inode_init_ts(inode);
>   		inode->i_fop = files->ops;
>   		inode->i_ino = i;
> -		d_add(dentry, inode);
> +		d_make_persistent(dentry, inode);
> +		dput(dentry);
>   	}
>   	return 0;
>   }

Putting on the dunce hat for the rest of us:

I think I understand the dput() for d_add() changes, but it is non-obvious.
Thinking of future maintenance, you may want to make a comment.

--Mark Tinguely



More information about the Linuxppc-dev mailing list