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>
This commit is contained in:
Al Viro 2017-06-15 00:42:56 -04:00
parent 09bf4f5b6e
commit 289dec5b89
1 changed files with 1 additions and 1 deletions

View File

@ -478,6 +478,7 @@ u64 ufs_new_fragments(struct inode *inode, void *p, u64 fragment,
if (result) { if (result) {
ufs_clear_frags(inode, result + oldcount, newcount - oldcount, ufs_clear_frags(inode, result + oldcount, newcount - oldcount,
locked_page != NULL); locked_page != NULL);
mutex_unlock(&UFS_SB(sb)->s_lock);
ufs_change_blocknr(inode, fragment - oldcount, oldcount, ufs_change_blocknr(inode, fragment - oldcount, oldcount,
uspi->s_sbbase + tmp, uspi->s_sbbase + tmp,
uspi->s_sbbase + result, locked_page); 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, UFS_I(inode)->i_lastfrag = max(UFS_I(inode)->i_lastfrag,
fragment + count); fragment + count);
write_sequnlock(&UFS_I(inode)->meta_lock); write_sequnlock(&UFS_I(inode)->meta_lock);
mutex_unlock(&UFS_SB(sb)->s_lock);
if (newcount < request) if (newcount < request)
ufs_free_fragments (inode, result + newcount, request - newcount); ufs_free_fragments (inode, result + newcount, request - newcount);
ufs_free_fragments (inode, tmp, oldcount); ufs_free_fragments (inode, tmp, oldcount);