summaryrefslogtreecommitdiffstats
path: root/fs/ufs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-06-18 16:13:56 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2015-07-06 17:39:43 -0400
commita96574233c5d2e50736d83abf65161ec5fa55852 (patch)
treeccc9863f01a2dc3028aa60994bd5b09a5b0e8a00 /fs/ufs
parent97e0f8f87c918620689ce542664a3115b752649d (diff)
ufs_trunc_branch(): separate the calls with non-NULL offsets
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ufs')
-rw-r--r--fs/ufs/inode.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c
index 9e409c12afdf..480c34ee1805 100644
--- a/fs/ufs/inode.c
+++ b/fs/ufs/inode.c
@@ -1091,13 +1091,16 @@ static void ufs_trunc_branch(struct inode *inode, unsigned *offsets, int depth2,
1091 } 1091 }
1092 1092
1093 if (--depth) { 1093 if (--depth) {
1094 if (!--depth2) 1094 if (offsets && --depth2) {
1095 offsets = NULL; 1095 void *ind = ubh_get_data_ptr(uspi, ubh, from++);
1096 for (i = from ; i < uspi->s_apb ; i++, offsets = NULL) {
1097 void *ind = ubh_get_data_ptr(uspi, ubh, i);
1098 ufs_trunc_branch(inode, offsets, depth2, depth, ind); 1096 ufs_trunc_branch(inode, offsets, depth2, depth, ind);
1099 ubh_mark_buffer_dirty(ubh); 1097 ubh_mark_buffer_dirty(ubh);
1100 } 1098 }
1099 for (i = from ; i < uspi->s_apb ; i++) {
1100 void *ind = ubh_get_data_ptr(uspi, ubh, i);
1101 ufs_trunc_branch(inode, NULL, 0, depth, ind);
1102 ubh_mark_buffer_dirty(ubh);
1103 }
1101 } else { 1104 } else {
1102 u64 frag_to_free = 0; 1105 u64 frag_to_free = 0;
1103 unsigned free_count = 0; 1106 unsigned free_count = 0;