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)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 23 Jul 2017 02:56:08 +0000 (02:56 +0000)
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 ....? */