summaryrefslogtreecommitdiff
path: root/fs/ufs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-06-19 03:14:02 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2015-07-07 00:39:50 +0300
commitcc7231e30916f5326bdde55a7a4c59431e15bc1b (patch)
treeae1d56214218cb5b8b5a5491cf9c2dcb4ec66c3c /fs/ufs
parentb6eede0ec642d1be17065110718cb4f4ed7ba5e0 (diff)
downloadlinux-cc7231e30916f5326bdde55a7a4c59431e15bc1b.tar.xz
free_full_branch(): don't bother modifying the block we are going to free
Note that it's already made unreachable from the inode, so we don't have to worry about ufs_frag_map() walking into something already freed. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ufs')
-rw-r--r--fs/ufs/inode.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c
index 26835a80f7dd..424949f459c8 100644
--- a/fs/ufs/inode.c
+++ b/fs/ufs/inode.c
@@ -1081,13 +1081,8 @@ static void free_full_branch(struct inode *inode, u64 ind_block, int depth)
for (i = 0; i < uspi->s_apb; i++) {
void *p = ubh_get_data_ptr(uspi, ubh, i);
u64 block = ufs_data_ptr_to_cpu(sb, p);
- if (block) {
- write_seqlock(&UFS_I(inode)->meta_lock);
- ufs_data_ptr_clear(uspi, p);
- write_sequnlock(&UFS_I(inode)->meta_lock);
+ if (block)
free_full_branch(inode, block, depth);
- ubh_mark_buffer_dirty(ubh);
- }
}
} else {
struct to_free ctx = {.inode = inode};
@@ -1095,13 +1090,8 @@ static void free_full_branch(struct inode *inode, u64 ind_block, int depth)
for (i = 0; i < uspi->s_apb; i++) {
void *p = ubh_get_data_ptr(uspi, ubh, i);
u64 block = ufs_data_ptr_to_cpu(sb, p);
- if (block) {
- write_seqlock(&UFS_I(inode)->meta_lock);
- ufs_data_ptr_clear(uspi, p);
- write_sequnlock(&UFS_I(inode)->meta_lock);
- ubh_mark_buffer_dirty(ubh);
+ if (block)
free_data(&ctx, block, uspi->s_fpb);
- }
}
free_data(&ctx, 0, 0);
}