]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ufs_getfrag_block(): we only grab ->truncate_mutex on block creation path
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 9 Jun 2017 03:28:53 +0000 (23:28 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jun 2017 13:06:01 +0000 (15:06 +0200)
commit 006351ac8ead0d4a67dd3845e3ceffe650a23212 upstream.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ufs/inode.c

index 27c994fb811aa953ee66f93f69a73766e14390ee..a2760a2869f4ce5fd77a0f6021e58ea0a6888d92 100644 (file)
@@ -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 ....? */