Unverified Commit 5a35d512 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!12922 ocfs2: fix possible null-ptr-deref in ocfs2_set_buffer_uptodate

parents 3d987923 deb6e182
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -388,6 +388,7 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr,
		/* Always set the buffer in the cache, even if it was
		 * a forced read, or read-ahead which hasn't yet
		 * completed. */
		if (bh)
			ocfs2_set_buffer_uptodate(ci, bh);
	}
	ocfs2_metadata_cache_io_unlock(ci);