summary refs log tree commit diff
path: root/fs/ext4
diff options
context:
space:
mode:
authorzhangyi (F) <yi.zhang@huawei.com>2020-09-24 15:33:34 +0800
committerTheodore Ts'o <tytso@mit.edu>2020-10-18 10:37:14 -0400
commit60c776e50bc52a9334be8a49415479d5cb6ca2e2 (patch)
tree016eda3d8cd30f3dddec3b1ee446de1a28cccb6c /fs/ext4
parent2d069c0889ef0decda7af6ecbdc63b680b767749 (diff)
downloadlinux-60c776e50bc52a9334be8a49415479d5cb6ca2e2.tar.gz
ext4: use ext4_buffer_uptodate() in __ext4_get_inode_loc()
We have already introduced ext4_buffer_uptodate() to re-set the uptodate
bit on buffer which has been failed to write out to disk. Just remove
the redundant codes and switch to use ext4_buffer_uptodate() in
__ext4_get_inode_loc().

Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
Link: https://lore.kernel.org/r/20200924073337.861472-5-yi.zhang@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/inode.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 36d381622677..39c02dc79a72 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -4310,16 +4310,7 @@ static int __ext4_get_inode_loc(struct inode *inode,
 	if (!buffer_uptodate(bh)) {
 		lock_buffer(bh);
 
-		/*
-		 * If the buffer has the write error flag, we have failed
-		 * to write out another inode in the same block.  In this
-		 * case, we don't have to read the block because we may
-		 * read the old inode data successfully.
-		 */
-		if (buffer_write_io_error(bh) && !buffer_uptodate(bh))
-			set_buffer_uptodate(bh);
-
-		if (buffer_uptodate(bh)) {
+		if (ext4_buffer_uptodate(bh)) {
 			/* someone brought it uptodate while we waited */
 			unlock_buffer(bh);
 			goto has_buffer;