summaryrefslogtreecommitdiffstats
path: root/fs/ufs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-06-15 00:42:56 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2017-06-15 00:42:56 -0400
commit289dec5b895a7ecefb2f49da109e6aed9b0f1754 (patch)
tree0be6ed8e4f1607918aa4a44bee6b4ce33843e6cf /fs/ufs
parent09bf4f5b6e6013f0ad6b090d4a8deebd4e56d878 (diff)
downloadlinux-289dec5b895a7ecefb2f49da109e6aed9b0f1754.tar.gz
linux-289dec5b895a7ecefb2f49da109e6aed9b0f1754.tar.bz2
linux-289dec5b895a7ecefb2f49da109e6aed9b0f1754.zip
ufs: more deadlock prevention on tail unpacking
->s_lock is not needed for ufs_change_blocknr() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ufs')
-rw-r--r--fs/ufs/balloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ufs/balloc.c b/fs/ufs/balloc.c
index d56d9bc705fe..0315fea1d589 100644
--- a/fs/ufs/balloc.c
+++ b/fs/ufs/balloc.c
@@ -478,6 +478,7 @@ u64 ufs_new_fragments(struct inode *inode, void *p, u64 fragment,
if (result) {
ufs_clear_frags(inode, result + oldcount, newcount - oldcount,
locked_page != NULL);
+ mutex_unlock(&UFS_SB(sb)->s_lock);
ufs_change_blocknr(inode, fragment - oldcount, oldcount,
uspi->s_sbbase + tmp,
uspi->s_sbbase + result, locked_page);
@@ -487,7 +488,6 @@ u64 ufs_new_fragments(struct inode *inode, void *p, u64 fragment,
UFS_I(inode)->i_lastfrag = max(UFS_I(inode)->i_lastfrag,
fragment + count);
write_sequnlock(&UFS_I(inode)->meta_lock);
- mutex_unlock(&UFS_SB(sb)->s_lock);
if (newcount < request)
ufs_free_fragments (inode, result + newcount, request - newcount);
ufs_free_fragments (inode, tmp, oldcount);