summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-06-18 20:09:39 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2015-07-06 17:39:49 -0400
commitb6eede0ec642d1be17065110718cb4f4ed7ba5e0 (patch)
treed417892f5d1f3fd09bbc284faf1a5460702a8af5
parent163073db51930d1f9c2960b8e5660c269164f29b (diff)
downloadlinux-b6eede0ec642d1be17065110718cb4f4ed7ba5e0.tar.gz
linux-b6eede0ec642d1be17065110718cb4f4ed7ba5e0.tar.bz2
linux-b6eede0ec642d1be17065110718cb4f4ed7ba5e0.zip
move marking inode dirty to the end of __ufs_truncate_blocks()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/ufs/inode.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c
index efe71e5acb00..26835a80f7dd 100644
--- a/fs/ufs/inode.c
+++ b/fs/ufs/inode.c
@@ -1027,7 +1027,6 @@ static void ufs_trunc_direct(struct inode *inode)
frag1 = ufs_fragnum (frag1);
ufs_free_fragments(inode, tmp + frag1, frag2);
- mark_inode_dirty(inode);
next1:
/*
@@ -1043,7 +1042,6 @@ next1:
write_sequnlock(&ufsi->meta_lock);
free_data(&ctx, tmp, uspi->s_fpb);
- mark_inode_dirty(inode);
}
free_data(&ctx, 0, 0);
@@ -1064,7 +1062,6 @@ next1:
write_sequnlock(&ufsi->meta_lock);
ufs_free_fragments (inode, tmp, frag4);
- mark_inode_dirty(inode);
next3:
UFSD("EXIT: ino %lu\n", inode->i_ino);
@@ -1104,7 +1101,6 @@ static void free_full_branch(struct inode *inode, u64 ind_block, int depth)
write_sequnlock(&UFS_I(inode)->meta_lock);
ubh_mark_buffer_dirty(ubh);
free_data(&ctx, block, uspi->s_fpb);
- mark_inode_dirty(inode);
}
}
free_data(&ctx, 0, 0);
@@ -1112,7 +1108,6 @@ static void free_full_branch(struct inode *inode, u64 ind_block, int depth)
ubh_bforget(ubh);
ufs_free_blocks(inode, ind_block, uspi->s_fpb);
- mark_inode_dirty(inode);
}
static void free_branch_tail(struct inode *inode, unsigned from, struct ufs_buffer_head *ubh, int depth)
@@ -1145,7 +1140,6 @@ static void free_branch_tail(struct inode *inode, unsigned from, struct ufs_buff
write_sequnlock(&UFS_I(inode)->meta_lock);
ubh_mark_buffer_dirty(ubh);
free_data(&ctx, block, uspi->s_fpb);
- mark_inode_dirty(inode);
}
}
free_data(&ctx, 0, 0);
@@ -1283,6 +1277,7 @@ static void __ufs_truncate_blocks(struct inode *inode)
}
}
ufsi->i_lastfrag = DIRECT_FRAGMENT;
+ mark_inode_dirty(inode);
mutex_unlock(&ufsi->truncate_mutex);
}