From: Al Viro Date: Fri, 9 Jun 2017 03:28:53 +0000 (-0400) Subject: ufs_getfrag_block(): we only grab ->truncate_mutex on block creation path X-Git-Tag: archive/raspbian/4.9.30-2+deb9u2+rpi1~4^2~507 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7e64f4d0d747071e20ec3e2c5294caf735d06f03;p=linux-4.9.git ufs_getfrag_block(): we only grab ->truncate_mutex on block creation path commit 006351ac8ead0d4a67dd3845e3ceffe650a23212 upstream. Signed-off-by: Al Viro Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c index 27c994fb811a..a2760a2869f4 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 ....? */