Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207568
b: refs/heads/master
c: 62aff86
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Aug 9, 2010
1 parent 4f00bae commit 6d2967b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ea544009206baa03d606161656618900260b48e5
refs/heads/master: 62aff86fdf18657d9eca7878654415f94f16d027
35 changes: 18 additions & 17 deletions trunk/fs/jfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,31 +145,32 @@ int jfs_write_inode(struct inode *inode, struct writeback_control *wbc)
return 0;
}

void jfs_delete_inode(struct inode *inode)
void jfs_evict_inode(struct inode *inode)
{
jfs_info("In jfs_delete_inode, inode = 0x%p", inode);
jfs_info("In jfs_evict_inode, inode = 0x%p", inode);

if (!is_bad_inode(inode))
if (!inode->i_nlink && !is_bad_inode(inode)) {
dquot_initialize(inode);

if (!is_bad_inode(inode) &&
(JFS_IP(inode)->fileset == FILESYSTEM_I)) {
truncate_inode_pages(&inode->i_data, 0);
if (JFS_IP(inode)->fileset == FILESYSTEM_I) {
truncate_inode_pages(&inode->i_data, 0);

if (test_cflag(COMMIT_Freewmap, inode))
jfs_free_zero_link(inode);
if (test_cflag(COMMIT_Freewmap, inode))
jfs_free_zero_link(inode);

diFree(inode);
diFree(inode);

/*
* Free the inode from the quota allocation.
*/
dquot_initialize(inode);
dquot_free_inode(inode);
dquot_drop(inode);
/*
* Free the inode from the quota allocation.
*/
dquot_initialize(inode);
dquot_free_inode(inode);
}
} else {
truncate_inode_pages(&inode->i_data, 0);
}

clear_inode(inode);
end_writeback(inode);
dquot_drop(inode);
}

void jfs_dirty_inode(struct inode *inode)
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/jfs/jfs_inode.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ extern long jfs_compat_ioctl(struct file *, unsigned int, unsigned long);
extern struct inode *jfs_iget(struct super_block *, unsigned long);
extern int jfs_commit_inode(struct inode *, int);
extern int jfs_write_inode(struct inode *, struct writeback_control *);
extern void jfs_delete_inode(struct inode *);
extern void jfs_evict_inode(struct inode *);
extern void jfs_dirty_inode(struct inode *);
extern void jfs_truncate(struct inode *);
extern void jfs_truncate_nolock(struct inode *, loff_t);
Expand Down
8 changes: 1 addition & 7 deletions trunk/fs/jfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,6 @@ static void jfs_destroy_inode(struct inode *inode)
kmem_cache_free(jfs_inode_cachep, ji);
}

static void jfs_clear_inode(struct inode *inode)
{
dquot_drop(inode);
}

static int jfs_statfs(struct dentry *dentry, struct kstatfs *buf)
{
struct jfs_sb_info *sbi = JFS_SBI(dentry->d_sb);
Expand Down Expand Up @@ -765,8 +760,7 @@ static const struct super_operations jfs_super_operations = {
.destroy_inode = jfs_destroy_inode,
.dirty_inode = jfs_dirty_inode,
.write_inode = jfs_write_inode,
.delete_inode = jfs_delete_inode,
.clear_inode = jfs_clear_inode,
.evict_inode = jfs_evict_inode,
.put_super = jfs_put_super,
.sync_fs = jfs_sync_fs,
.freeze_fs = jfs_freeze,
Expand Down

0 comments on commit 6d2967b

Please sign in to comment.