diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-06-07 13:16:22 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-08-09 16:48:30 -0400 |
commit | 0930fcc1ee2f0a810b938bc283a3a262d7adccbb (patch) | |
tree | 5e5d10894f1e31a7aede75110b43d7a41347631d /fs/ext4/inode.c | |
parent | 7da08fd17a6e42d80f0f3897a5cbd682e77bcdb4 (diff) |
convert ext4 to ->evict_inode()
pretty much brute-force...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r-- | fs/ext4/inode.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 1fb390359bc..c6d365f9c66 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -167,11 +167,16 @@ int ext4_truncate_restart_trans(handle_t *handle, struct inode *inode, | |||
167 | /* | 167 | /* |
168 | * Called at the last iput() if i_nlink is zero. | 168 | * Called at the last iput() if i_nlink is zero. |
169 | */ | 169 | */ |
170 | void ext4_delete_inode(struct inode *inode) | 170 | void ext4_evict_inode(struct inode *inode) |
171 | { | 171 | { |
172 | handle_t *handle; | 172 | handle_t *handle; |
173 | int err; | 173 | int err; |
174 | 174 | ||
175 | if (inode->i_nlink) { | ||
176 | truncate_inode_pages(&inode->i_data, 0); | ||
177 | goto no_delete; | ||
178 | } | ||
179 | |||
175 | if (!is_bad_inode(inode)) | 180 | if (!is_bad_inode(inode)) |
176 | dquot_initialize(inode); | 181 | dquot_initialize(inode); |
177 | 182 | ||
@@ -245,13 +250,13 @@ void ext4_delete_inode(struct inode *inode) | |||
245 | */ | 250 | */ |
246 | if (ext4_mark_inode_dirty(handle, inode)) | 251 | if (ext4_mark_inode_dirty(handle, inode)) |
247 | /* If that failed, just do the required in-core inode clear. */ | 252 | /* If that failed, just do the required in-core inode clear. */ |
248 | clear_inode(inode); | 253 | ext4_clear_inode(inode); |
249 | else | 254 | else |
250 | ext4_free_inode(handle, inode); | 255 | ext4_free_inode(handle, inode); |
251 | ext4_journal_stop(handle); | 256 | ext4_journal_stop(handle); |
252 | return; | 257 | return; |
253 | no_delete: | 258 | no_delete: |
254 | clear_inode(inode); /* We must guarantee clearing of inode... */ | 259 | ext4_clear_inode(inode); /* We must guarantee clearing of inode... */ |
255 | } | 260 | } |
256 | 261 | ||
257 | typedef struct { | 262 | typedef struct { |