File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,6 @@ void sysv_free_inode(struct inode * inode)
113
113
return ;
114
114
}
115
115
raw_inode = sysv_raw_inode (sb , ino , & bh );
116
- clear_inode (inode );
117
116
if (!raw_inode ) {
118
117
printk ("sysv_free_inode: unable to read inode block on device "
119
118
"%s\n" , inode -> i_sb -> s_id );
Original file line number Diff line number Diff line change @@ -308,12 +308,17 @@ int sysv_sync_inode(struct inode *inode)
308
308
return __sysv_write_inode (inode , 1 );
309
309
}
310
310
311
- static void sysv_delete_inode (struct inode * inode )
311
+ static void sysv_evict_inode (struct inode * inode )
312
312
{
313
313
truncate_inode_pages (& inode -> i_data , 0 );
314
- inode -> i_size = 0 ;
315
- sysv_truncate (inode );
316
- sysv_free_inode (inode );
314
+ if (!inode -> i_nlink ) {
315
+ inode -> i_size = 0 ;
316
+ sysv_truncate (inode );
317
+ }
318
+ invalidate_inode_buffers (inode );
319
+ end_writeback (inode );
320
+ if (!inode -> i_nlink )
321
+ sysv_free_inode (inode );
317
322
}
318
323
319
324
static struct kmem_cache * sysv_inode_cachep ;
@@ -344,7 +349,7 @@ const struct super_operations sysv_sops = {
344
349
.alloc_inode = sysv_alloc_inode ,
345
350
.destroy_inode = sysv_destroy_inode ,
346
351
.write_inode = sysv_write_inode ,
347
- .delete_inode = sysv_delete_inode ,
352
+ .evict_inode = sysv_evict_inode ,
348
353
.put_super = sysv_put_super ,
349
354
.write_super = sysv_write_super ,
350
355
.sync_fs = sysv_sync_fs ,
You can’t perform that action at this time.
0 commit comments