diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-06-18 20:09:39 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-07-06 17:39:49 -0400 |
commit | b6eede0ec642d1be17065110718cb4f4ed7ba5e0 (patch) | |
tree | d417892f5d1f3fd09bbc284faf1a5460702a8af5 /fs/ufs | |
parent | 163073db51930d1f9c2960b8e5660c269164f29b (diff) |
move marking inode dirty to the end of __ufs_truncate_blocks()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ufs')
-rw-r--r-- | fs/ufs/inode.c | 7 |
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) | |||
1027 | frag1 = ufs_fragnum (frag1); | 1027 | frag1 = ufs_fragnum (frag1); |
1028 | 1028 | ||
1029 | ufs_free_fragments(inode, tmp + frag1, frag2); | 1029 | ufs_free_fragments(inode, tmp + frag1, frag2); |
1030 | mark_inode_dirty(inode); | ||
1031 | 1030 | ||
1032 | next1: | 1031 | next1: |
1033 | /* | 1032 | /* |
@@ -1043,7 +1042,6 @@ next1: | |||
1043 | write_sequnlock(&ufsi->meta_lock); | 1042 | write_sequnlock(&ufsi->meta_lock); |
1044 | 1043 | ||
1045 | free_data(&ctx, tmp, uspi->s_fpb); | 1044 | free_data(&ctx, tmp, uspi->s_fpb); |
1046 | mark_inode_dirty(inode); | ||
1047 | } | 1045 | } |
1048 | 1046 | ||
1049 | free_data(&ctx, 0, 0); | 1047 | free_data(&ctx, 0, 0); |
@@ -1064,7 +1062,6 @@ next1: | |||
1064 | write_sequnlock(&ufsi->meta_lock); | 1062 | write_sequnlock(&ufsi->meta_lock); |
1065 | 1063 | ||
1066 | ufs_free_fragments (inode, tmp, frag4); | 1064 | ufs_free_fragments (inode, tmp, frag4); |
1067 | mark_inode_dirty(inode); | ||
1068 | next3: | 1065 | next3: |
1069 | 1066 | ||
1070 | UFSD("EXIT: ino %lu\n", inode->i_ino); | 1067 | 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) | |||
1104 | write_sequnlock(&UFS_I(inode)->meta_lock); | 1101 | write_sequnlock(&UFS_I(inode)->meta_lock); |
1105 | ubh_mark_buffer_dirty(ubh); | 1102 | ubh_mark_buffer_dirty(ubh); |
1106 | free_data(&ctx, block, uspi->s_fpb); | 1103 | free_data(&ctx, block, uspi->s_fpb); |
1107 | mark_inode_dirty(inode); | ||
1108 | } | 1104 | } |
1109 | } | 1105 | } |
1110 | free_data(&ctx, 0, 0); | 1106 | free_data(&ctx, 0, 0); |
@@ -1112,7 +1108,6 @@ static void free_full_branch(struct inode *inode, u64 ind_block, int depth) | |||
1112 | 1108 | ||
1113 | ubh_bforget(ubh); | 1109 | ubh_bforget(ubh); |
1114 | ufs_free_blocks(inode, ind_block, uspi->s_fpb); | 1110 | ufs_free_blocks(inode, ind_block, uspi->s_fpb); |
1115 | mark_inode_dirty(inode); | ||
1116 | } | 1111 | } |
1117 | 1112 | ||
1118 | static void free_branch_tail(struct inode *inode, unsigned from, struct ufs_buffer_head *ubh, int depth) | 1113 | 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 | |||
1145 | write_sequnlock(&UFS_I(inode)->meta_lock); | 1140 | write_sequnlock(&UFS_I(inode)->meta_lock); |
1146 | ubh_mark_buffer_dirty(ubh); | 1141 | ubh_mark_buffer_dirty(ubh); |
1147 | free_data(&ctx, block, uspi->s_fpb); | 1142 | free_data(&ctx, block, uspi->s_fpb); |
1148 | mark_inode_dirty(inode); | ||
1149 | } | 1143 | } |
1150 | } | 1144 | } |
1151 | free_data(&ctx, 0, 0); | 1145 | free_data(&ctx, 0, 0); |
@@ -1283,6 +1277,7 @@ static void __ufs_truncate_blocks(struct inode *inode) | |||
1283 | } | 1277 | } |
1284 | } | 1278 | } |
1285 | ufsi->i_lastfrag = DIRECT_FRAGMENT; | 1279 | ufsi->i_lastfrag = DIRECT_FRAGMENT; |
1280 | mark_inode_dirty(inode); | ||
1286 | mutex_unlock(&ufsi->truncate_mutex); | 1281 | mutex_unlock(&ufsi->truncate_mutex); |
1287 | } | 1282 | } |
1288 | 1283 | ||