diff options
| author | Baolin Liu <liubaolin@kylinos.cn> | 2026-09-04 17:00:53 +0800 |
|---|---|---|
| committer | Namjae Jeon <linkinjeon@kernel.org> | 2026-09-04 23:11:42 +0900 |
| commit | 29d02180132ce0c5c4e18fe53b5c1924bec64002 (patch) | |
| tree | 0f393e245a90be49cefd9b1d1a22e18e1aa0ea0d /fs | |
| parent | f8531620a9da16690f1f192658287e437fad543c (diff) | |
| download | linux-next-29d02180132ce0c5c4e18fe53b5c1924bec64002.tar.gz linux-next-29d02180132ce0c5c4e18fe53b5c1924bec64002.zip | |
ntfs: propagate the map_mft_record() error in ntfs_attrlist_entry_add()
ntfs_attrlist_entry_add() replaces the map_mft_record() error with -EIO,
so an -ENOMEM allocation failure is reported as an I/O error. Both
callers pass the value on to ntfs_attr_add(), which no longer collapses
it since commit 8efe00b098b5 ("ntfs: preserve error code in
ntfs_resident_attr_record_add()").
Return PTR_ERR(ni_mrec) instead. Also fix the debug message.
Fixes: 495e90fa3348 ("ntfs: update attrib operations")
Signed-off-by: Baolin Liu <liubaolin@kylinos.cn>
Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/ntfs/attrlist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ntfs/attrlist.c b/fs/ntfs/attrlist.c index be3086d34338..a1c00e426e80 100644 --- a/fs/ntfs/attrlist.c +++ b/fs/ntfs/attrlist.c @@ -139,8 +139,8 @@ int ntfs_attrlist_entry_add(struct ntfs_inode *ni, struct attr_record *attr) ni_mrec = map_mft_record(ni); if (IS_ERR(ni_mrec)) { - ntfs_debug("Invalid arguments.\n"); - return -EIO; + ntfs_debug("Failed to map mft record.\n"); + return PTR_ERR(ni_mrec); } mref = MK_LE_MREF(ni->mft_no, le16_to_cpu(ni_mrec->sequence_number)); |
