Skip to contentSkip to conversation

f2fs: code cleanup by removing unnecessary check

PATCH In review Chengguang Xu 2 participants 2 messages Oct 12, 2020 – Oct 13, 2020 F2FS file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 f2fs: code cleanup by removing unnecessary check

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

---
 fs/f2fs/file.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
fs/f2fs/file.c +2 -3
index 8a422400e824..048c89517001 100644
@@ -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;
 	}
 
Signature · 9 lines
2.26.2




_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel