All of lore.kernel.org
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH] f2fs: code cleanup by removing unnecessary check
@ 2020-10-12 22:49 Chengguang Xu
  2020-10-13  3:33 ` Chao Yu
  0 siblings, 1 reply; 2+ messages in thread
From: Chengguang Xu @ 2020-10-12 22:49 UTC (permalink / raw)
  To: jaegeuk, chao; +Cc: Chengguang Xu, linux-f2fs-devel

f2fs_seek_block() is only used for regular file,
so don't have to check inline dentry in it.

Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>
---
 fs/f2fs/file.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 8a422400e824..048c89517001 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -429,9 +429,8 @@ static loff_t f2fs_seek_block(struct file *file, loff_t offset, int whence)
 		goto fail;
 
 	/* handle inline data case */
-	if (f2fs_has_inline_data(inode) || f2fs_has_inline_dentry(inode)) {
-		if (whence == SEEK_HOLE)
-			data_ofs = isize;
+	if (f2fs_has_inline_data(inode) && whence == SEEK_HOLE) {
+		data_ofs = isize;
 		goto found;
 	}
 
-- 
2.26.2




_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: code cleanup by removing unnecessary check
  2020-10-12 22:49 [f2fs-dev] [PATCH] f2fs: code cleanup by removing unnecessary check Chengguang Xu
@ 2020-10-13  3:33 ` Chao Yu
  0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2020-10-13  3:33 UTC (permalink / raw)
  To: Chengguang Xu, jaegeuk, chao; +Cc: linux-f2fs-devel

On 2020/10/13 6:49, Chengguang Xu wrote:
> f2fs_seek_block() is only used for regular file,
> so don't have to check inline dentry in it.
> 
> Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-13  3:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-12 22:49 [f2fs-dev] [PATCH] f2fs: code cleanup by removing unnecessary check Chengguang Xu
2020-10-13  3:33 ` Chao Yu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.