mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: liubaolin <liubaolin12138@163.com>
To: Namjae Jeon <linkinjeon@kernel.org>
Cc: hyc.lee@gmail.com, ntfs@lists.linux.dev,
	linux-kernel@vger.kernel.org, Baolin Liu <liubaolin@kylinos.cn>
Subject: Re: [PATCH v2 2/5] ntfs: fix error handling in ntfs_extent_inode_open and propagate errors
Date: Sat, 5 Sep 2026 18:50:50 +0800	[thread overview]
Message-ID: <a07bcb84-88e2-4d2f-802d-f24ac390b18b@163.com> (raw)
In-Reply-To: <CAKYAXd_5ZcxzTP7OD9yv+ns-KYqjz2-BKaNmdi4YmtbVxJBq=w@mail.gmail.com>



在 2026/9/4 22:20, Namjae Jeon 写道:
>> @@ -2968,8 +2967,10 @@ static struct ntfs_inode *ntfs_extent_inode_open(struct ntfs_inode *base_ni,
>>                  i = (base_ni->nr_extents + 4) * sizeof(struct ntfs_inode *);
>>
>>                  extent_nis = kvzalloc(i, GFP_NOFS);
>> -               if (!extent_nis)
>> +               if (!extent_nis) {
>> +                       ni = ERR_PTR(-ENOMEM);
> It overwrites ni with ERR_PTR(-ENOMEM). ntfs_destroy_ext_inode() must
> be called before doing so.
> 
>>                          goto err_out;
>> +               }
>>                  if (base_ni->nr_extents) {
>>                          memcpy(extent_nis, base_ni->ext.extent_ntfs_inos,
>>                                          i - 4 * sizeof(struct ntfs_inode *));

Hi Namjae,

   Thanks for the review!

   Sorry, that was my oversight. I should call 
ntfs_destroy_ext_inode(ni) first and then return ERR_PTR(-ENOMEM) directly.

   I'll send v3 soon.

Thanks,
Baolin.


  reply	other threads:[~2026-09-05 10:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04  9:00 [PATCH v2 0/5] ntfs: fix incorrect error codes returned to callers Baolin Liu
2026-09-04  9:00 ` [PATCH v2 1/5] ntfs: return -EINVAL from ntfs_collate_ntofs_ulongs() on bad length Baolin Liu
2026-09-04  9:00 ` [PATCH v2 2/5] ntfs: fix error handling in ntfs_extent_inode_open and propagate errors Baolin Liu
2026-09-04 14:20   ` Namjae Jeon
2026-09-05 10:50     ` liubaolin [this message]
2026-09-04  9:00 ` [PATCH v2 3/5] ntfs: preserve the truncate error in ntfs_enlarge_attribute() Baolin Liu
2026-09-04  9:00 ` [PATCH v2 4/5] ntfs: propagate the map_mft_record() error in ntfs_attrlist_entry_add() Baolin Liu
2026-09-04  9:00 ` [PATCH v2 5/5] ntfs: propagate the ntfs_attr_iget() error in update_reparse_data() Baolin Liu
2026-09-04 14:22 ` [PATCH v2 0/5] ntfs: fix incorrect error codes returned to callers Namjae Jeon
2026-09-05 10:56   ` liubaolin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a07bcb84-88e2-4d2f-802d-f24ac390b18b@163.com \
    --to=liubaolin12138@163.com \
    --cc=hyc.lee@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liubaolin@kylinos.cn \
    --cc=ntfs@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®