diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-06-17 19:26:18 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-07-06 17:39:24 -0400 |
commit | 4af7b2c080715b9452fdaefb7ada72b4dc79593e (patch) | |
tree | 0014e43098738b3a392862f35928b6163d88a7e2 /fs/ufs | |
parent | 493b4537a26b104fb3bd07ff4a46b6ede4288e76 (diff) |
ufs: bforget() indirect blocks before freeing them
right now it doesn't matter (lock_ufs() serializes everything),
but when we switch to per-inode locking, it will be needed.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ufs')
-rw-r--r-- | fs/ufs/truncate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ufs/truncate.c b/fs/ufs/truncate.c index 155e13aea80c..9908a6045d7a 100644 --- a/fs/ufs/truncate.c +++ b/fs/ufs/truncate.c @@ -237,9 +237,9 @@ static int ufs_trunc_indirect(struct inode *inode, u64 offset, void *p) tmp = ufs_data_ptr_to_cpu(sb, p); ufs_data_ptr_clear(uspi, p); + ubh_bforget(ind_ubh); ufs_free_blocks (inode, tmp, uspi->s_fpb); mark_inode_dirty(inode); - ubh_bforget(ind_ubh); ind_ubh = NULL; } if (IS_SYNC(inode) && ind_ubh && ubh_buffer_dirty(ind_ubh)) @@ -299,9 +299,9 @@ static int ufs_trunc_dindirect(struct inode *inode, u64 offset, void *p) tmp = ufs_data_ptr_to_cpu(sb, p); ufs_data_ptr_clear(uspi, p); + ubh_bforget(dind_bh); ufs_free_blocks(inode, tmp, uspi->s_fpb); mark_inode_dirty(inode); - ubh_bforget(dind_bh); dind_bh = NULL; } if (IS_SYNC(inode) && dind_bh && ubh_buffer_dirty(dind_bh)) @@ -357,9 +357,9 @@ static int ufs_trunc_tindirect(struct inode *inode) tmp = ufs_data_ptr_to_cpu(sb, p); ufs_data_ptr_clear(uspi, p); + ubh_bforget(tind_bh); ufs_free_blocks(inode, tmp, uspi->s_fpb); mark_inode_dirty(inode); - ubh_bforget(tind_bh); tind_bh = NULL; } if (IS_SYNC(inode) && tind_bh && ubh_buffer_dirty(tind_bh)) |