* [PATCH] exfat: fix potential wrong error return from get_block [not found] <CGME20250326144918epcas1p1bf704db657010812a18e9fef5c3a6784@epcas1p1.samsung.com> @ 2025-03-26 14:48 ` Sungjong Seo 2025-03-29 8:06 ` Yuezhang.Mo 2025-03-29 13:13 ` Namjae Jeon 0 siblings, 2 replies; 3+ messages in thread From: Sungjong Seo @ 2025-03-26 14:48 UTC (permalink / raw) To: linkinjeon, yuezhang.mo Cc: sjdev.seo, linux-fsdevel, linux-kernel, cpgs, Sungjong Seo, stable If there is no error, get_block() should return 0. However, when bh_read() returns 1, get_block() also returns 1 in the same manner. Let's set err to 0, if there is no error from bh_read() Fixes: 11a347fb6cef ("exfat: change to get file size from DataLength") Cc: stable@vger.kernel.org Signed-off-by: Sungjong Seo <sj1557.seo@samsung.com> --- fs/exfat/inode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/exfat/inode.c b/fs/exfat/inode.c index f3fdba9f4d21..a23677de4544 100644 --- a/fs/exfat/inode.c +++ b/fs/exfat/inode.c @@ -391,6 +391,8 @@ static int exfat_get_block(struct inode *inode, sector_t iblock, /* Zero unwritten part of a block */ memset(bh_result->b_data + size, 0, bh_result->b_size - size); + + err = 0; } else { /* * The range has not been written, clear the mapped flag -- 2.25.1 ^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] exfat: fix potential wrong error return from get_block 2025-03-26 14:48 ` [PATCH] exfat: fix potential wrong error return from get_block Sungjong Seo @ 2025-03-29 8:06 ` Yuezhang.Mo 2025-03-29 13:13 ` Namjae Jeon 1 sibling, 0 replies; 3+ messages in thread From: Yuezhang.Mo @ 2025-03-29 8:06 UTC (permalink / raw) To: Sungjong Seo, linkinjeon Cc: sjdev.seo, linux-fsdevel, linux-kernel, cpgs, stable Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com> ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] exfat: fix potential wrong error return from get_block 2025-03-26 14:48 ` [PATCH] exfat: fix potential wrong error return from get_block Sungjong Seo 2025-03-29 8:06 ` Yuezhang.Mo @ 2025-03-29 13:13 ` Namjae Jeon 1 sibling, 0 replies; 3+ messages in thread From: Namjae Jeon @ 2025-03-29 13:13 UTC (permalink / raw) To: Sungjong Seo Cc: yuezhang.mo, sjdev.seo, linux-fsdevel, linux-kernel, cpgs, stable On Wed, Mar 26, 2025 at 11:49 PM Sungjong Seo <sj1557.seo@samsung.com> wrote: > > If there is no error, get_block() should return 0. However, when bh_read() > returns 1, get_block() also returns 1 in the same manner. > > Let's set err to 0, if there is no error from bh_read() > > Fixes: 11a347fb6cef ("exfat: change to get file size from DataLength") > Cc: stable@vger.kernel.org > Signed-off-by: Sungjong Seo <sj1557.seo@samsung.com> Applied it to dev with Yuezhang's reviewed-by tag. Thanks! ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-03-29 13:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20250326144918epcas1p1bf704db657010812a18e9fef5c3a6784@epcas1p1.samsung.com>
2025-03-26 14:48 ` [PATCH] exfat: fix potential wrong error return from get_block Sungjong Seo
2025-03-29 8:06 ` Yuezhang.Mo
2025-03-29 13:13 ` Namjae Jeon
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®