Skip to content

Commit f0d2e15

Browse files
Al Virogregkh
authored andcommitted
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>
1 parent 34aa71c commit f0d2e15

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

fs/ufs/inode.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,9 @@ static int ufs_getfrag_block(struct inode *inode, sector_t fragment, struct buff
403403

404404
if (!create) {
405405
phys64 = ufs_frag_map(inode, offsets, depth);
406-
goto out;
406+
if (phys64)
407+
map_bh(bh_result, sb, phys64 + frag);
408+
return 0;
407409
}
408410

409411
/* This code entered only while writing ....? */

0 commit comments

Comments
 (0)