Re: [PATCH next] ntfs: add missing error code in ntfs_mft_record_alloc()

Hyunchul Lee <[email protected]>
Newsgroups org.kernel.vger.kernel-janitors,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel
Message-ID <CANFS6bY_9YtCSpATnhEqzZKv48g86Sk4Cf36cVvLgZm3gQ8Bcw@mail.gmail.com>
2026년 4월 10일 (금) 오후 3:47, Dan Carpenter <[email protected]>님이 작성:
>
> Return -ENOMEM if the kmalloc() fails.  Don't return success.
>
> Fixes: 115380f9a2f9 ("ntfs: update mft operations")
> Signed-off-by: Dan Carpenter <[email protected]>

Looks good to me.

Reviewed-by: Hyunchul Lee <[email protected]>

> ---
> This email is a free service from the Smatch-CI project [smatch.sf.net].
>
> I have wanted to avoid sending patches but it was easier to fix it than
> explain the warning.  :P
>
>     fs/ntfs/namei.c:677 __ntfs_create() error: uninitialized symbol 'ni_mrec'.
>
>  fs/ntfs/mft.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/fs/ntfs/mft.c b/fs/ntfs/mft.c
> index bf028c1aea26..0c545fd08b66 100644
> --- a/fs/ntfs/mft.c
> +++ b/fs/ntfs/mft.c
> @@ -2503,6 +2503,7 @@ int ntfs_mft_record_alloc(struct ntfs_volume *vol, const int mode,
>                         folio_unlock(folio);
>                         kunmap_local(m);
>                         folio_put(folio);
> +                       err = -ENOMEM;
>                         goto undo_mftbmp_alloc;
>                 }
>
> --
> 2.53.0
>


-- 
Thanks,
Hyunchul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.