summaryrefslogtreecommitdiff
path: root/fs/nilfs2/dat.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2022-12-01 01:58:42 +0300
committerAndrew Morton <akpm@linux-foundation.org>2022-12-01 01:58:42 +0300
commita38358c934f66bdff12db762998b88038d7bc44b (patch)
tree72747f34cde18a9e2188b6bccb865c14d423b986 /fs/nilfs2/dat.c
parentea0ffd0c08d0fef1f6e93eb07badbeeabf6b43d6 (diff)
parent1d351f1894342c378b96bb9ed89f8debb1e24e9f (diff)
downloadlinux-a38358c934f66bdff12db762998b88038d7bc44b.tar.xz
Merge branch 'mm-hotfixes-stable' into mm-stable
Diffstat (limited to 'fs/nilfs2/dat.c')
-rw-r--r--fs/nilfs2/dat.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/nilfs2/dat.c b/fs/nilfs2/dat.c
index 3b55e239705f..9930fa901039 100644
--- a/fs/nilfs2/dat.c
+++ b/fs/nilfs2/dat.c
@@ -111,6 +111,13 @@ static void nilfs_dat_commit_free(struct inode *dat,
kunmap_atomic(kaddr);
nilfs_dat_commit_entry(dat, req);
+
+ if (unlikely(req->pr_desc_bh == NULL || req->pr_bitmap_bh == NULL)) {
+ nilfs_error(dat->i_sb,
+ "state inconsistency probably due to duplicate use of vblocknr = %llu",
+ (unsigned long long)req->pr_entry_nr);
+ return;
+ }
nilfs_palloc_commit_free_entry(dat, req);
}