diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2009-01-09 10:04:15 -0500 |
---|---|---|
committer | Arjan van de Ven <arjan@linux.intel.com> | 2009-01-09 16:15:49 -0500 |
commit | b32714ba29358a688ef337d5297bf4bdc9f596dc (patch) | |
tree | 7f7e7bbb7e7db106c012772e3c95d427b55d6a4b /fs/inode.c | |
parent | 7c51d57e9d7fbce89f79c41dc8da383101dbe9c6 (diff) |
partial revert of asynchronous inode delete
let the core of this one bake in -next as well, but leave
some of the infrastructure in place.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Diffstat (limited to 'fs/inode.c')
-rw-r--r-- | fs/inode.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/fs/inode.c b/fs/inode.c index 0013ac1af8e7..913ab2d9a5d1 100644 --- a/fs/inode.c +++ b/fs/inode.c | |||
@@ -1139,11 +1139,16 @@ EXPORT_SYMBOL(remove_inode_hash); | |||
1139 | * I_FREEING is set so that no-one will take a new reference to the inode while | 1139 | * I_FREEING is set so that no-one will take a new reference to the inode while |
1140 | * it is being deleted. | 1140 | * it is being deleted. |
1141 | */ | 1141 | */ |
1142 | static void generic_delete_inode_async(void *data, async_cookie_t cookie) | 1142 | void generic_delete_inode(struct inode *inode) |
1143 | { | 1143 | { |
1144 | struct inode *inode = data; | ||
1145 | const struct super_operations *op = inode->i_sb->s_op; | 1144 | const struct super_operations *op = inode->i_sb->s_op; |
1146 | 1145 | ||
1146 | list_del_init(&inode->i_list); | ||
1147 | list_del_init(&inode->i_sb_list); | ||
1148 | inode->i_state |= I_FREEING; | ||
1149 | inodes_stat.nr_inodes--; | ||
1150 | spin_unlock(&inode_lock); | ||
1151 | |||
1147 | security_inode_delete(inode); | 1152 | security_inode_delete(inode); |
1148 | 1153 | ||
1149 | if (op->delete_inode) { | 1154 | if (op->delete_inode) { |
@@ -1167,16 +1172,6 @@ static void generic_delete_inode_async(void *data, async_cookie_t cookie) | |||
1167 | destroy_inode(inode); | 1172 | destroy_inode(inode); |
1168 | } | 1173 | } |
1169 | 1174 | ||
1170 | void generic_delete_inode(struct inode *inode) | ||
1171 | { | ||
1172 | list_del_init(&inode->i_list); | ||
1173 | list_del_init(&inode->i_sb_list); | ||
1174 | inode->i_state |= I_FREEING; | ||
1175 | inodes_stat.nr_inodes--; | ||
1176 | spin_unlock(&inode_lock); | ||
1177 | async_schedule_special(generic_delete_inode_async, inode, &inode->i_sb->s_async_list); | ||
1178 | } | ||
1179 | |||
1180 | EXPORT_SYMBOL(generic_delete_inode); | 1175 | EXPORT_SYMBOL(generic_delete_inode); |
1181 | 1176 | ||
1182 | static void generic_forget_inode(struct inode *inode) | 1177 | static void generic_forget_inode(struct inode *inode) |