Re: [PATCH v1 1/2] fs: Fix return in orangefs_mkdir

From: Mike Marshall

Date: Sat May 02 2026 - 12:00:13 EST


Thanks for the patch. I assume you intend for me to get it pulled.
I will put it in my stack for next merge window.

-Mike

On Fri, May 1, 2026 at 10:54 PM Hongling Zeng <zenghongling@xxxxxxxxxx> wrote:
>
> Return NULL instead of passing to ERR_PTR while err is zero
> Fixes smatch warnings:
> - fs/orangefs/namei.c:369 orangefs_mkdir() warn: passing zero
> to 'ERR_PTR'
>
> Fixes: 88d5baf69082 ("Change inode_operations.mkdir to return struct dentry *")
> Signed-off-by: Hongling Zeng <zenghongling@xxxxxxxxxx>
> Reviewed-by: Jori Koolstra <jkoolstra@xxxxxxxxx>
>
> ---
> Change in v1:
> -Per review
> --
> ---
> fs/orangefs/namei.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/orangefs/namei.c b/fs/orangefs/namei.c
> index bec5475de094..75e65e72c2d6 100644
> --- a/fs/orangefs/namei.c
> +++ b/fs/orangefs/namei.c
> @@ -362,7 +362,7 @@ static struct dentry *orangefs_mkdir(struct mnt_idmap *idmap, struct inode *dir,
> __orangefs_setattr(dir, &iattr);
> out:
> op_release(new_op);
> - return ERR_PTR(ret);
> + return ret ? ERR_PTR(ret) : NULL;
> }
>
> static int orangefs_rename(struct mnt_idmap *idmap,
> --
> 2.25.1
>