summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-06-08 23:28:53 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-14 13:16:24 +0200
commitf0d2e153147ece8c1027b276b71b8ffca0245440 (patch)
treeae15f90b7c8b35e4a83792d2275d7b6998fdb7e2
parent34aa71cbd4085fe6089f8686a6ae449aaf36b4a0 (diff)
ufs_getfrag_block(): we only grab ->truncate_mutex on block creation path
commit 006351ac8ead0d4a67dd3845e3ceffe650a23212 upstream. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/ufs/inode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c
index 2ceccec0b609..1f69bb9b1e9d 100644
--- a/fs/ufs/inode.c
+++ b/fs/ufs/inode.c
@@ -403,7 +403,9 @@ static int ufs_getfrag_block(struct inode *inode, sector_t fragment, struct buff
if (!create) {
phys64 = ufs_frag_map(inode, offsets, depth);
- goto out;
+ if (phys64)
+ map_bh(bh_result, sb, phys64 + frag);
+ return 0;
}
/* This code entered only while writing ....? */