aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/affs/affs.h1
-rw-r--r--fs/affs/inode.c17
-rw-r--r--fs/affs/super.c1
3 files changed, 13 insertions, 6 deletions
diff --git a/fs/affs/affs.h b/fs/affs/affs.h
index 7db2d287e9f3..232c69493683 100644
--- a/fs/affs/affs.h
+++ b/fs/affs/affs.h
@@ -171,6 +171,7 @@ extern unsigned long affs_parent_ino(struct inode *dir);
171extern struct inode *affs_new_inode(struct inode *dir); 171extern struct inode *affs_new_inode(struct inode *dir);
172extern int affs_notify_change(struct dentry *dentry, struct iattr *attr); 172extern int affs_notify_change(struct dentry *dentry, struct iattr *attr);
173extern void affs_put_inode(struct inode *inode); 173extern void affs_put_inode(struct inode *inode);
174extern void affs_drop_inode(struct inode *inode);
174extern void affs_delete_inode(struct inode *inode); 175extern void affs_delete_inode(struct inode *inode);
175extern void affs_clear_inode(struct inode *inode); 176extern void affs_clear_inode(struct inode *inode);
176extern void affs_read_inode(struct inode *inode); 177extern void affs_read_inode(struct inode *inode);
diff --git a/fs/affs/inode.c b/fs/affs/inode.c
index fce6848a4641..c5b9d73c084a 100644
--- a/fs/affs/inode.c
+++ b/fs/affs/inode.c
@@ -243,12 +243,17 @@ affs_put_inode(struct inode *inode)
243{ 243{
244 pr_debug("AFFS: put_inode(ino=%lu, nlink=%u)\n", inode->i_ino, inode->i_nlink); 244 pr_debug("AFFS: put_inode(ino=%lu, nlink=%u)\n", inode->i_ino, inode->i_nlink);
245 affs_free_prealloc(inode); 245 affs_free_prealloc(inode);
246 if (atomic_read(&inode->i_count) == 1) { 246}
247 mutex_lock(&inode->i_mutex); 247
248 if (inode->i_size != AFFS_I(inode)->mmu_private) 248void
249 affs_truncate(inode); 249affs_drop_inode(struct inode *inode)
250 mutex_unlock(&inode->i_mutex); 250{
251 } 251 mutex_lock(&inode->i_mutex);
252 if (inode->i_size != AFFS_I(inode)->mmu_private)
253 affs_truncate(inode);
254 mutex_unlock(&inode->i_mutex);
255
256 generic_drop_inode(inode);
252} 257}
253 258
254void 259void
diff --git a/fs/affs/super.c b/fs/affs/super.c
index a324045d8554..c3986a1911b0 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -118,6 +118,7 @@ static const struct super_operations affs_sops = {
118 .read_inode = affs_read_inode, 118 .read_inode = affs_read_inode,
119 .write_inode = affs_write_inode, 119 .write_inode = affs_write_inode,
120 .put_inode = affs_put_inode, 120 .put_inode = affs_put_inode,
121 .drop_inode = affs_drop_inode,
121 .delete_inode = affs_delete_inode, 122 .delete_inode = affs_delete_inode,
122 .clear_inode = affs_clear_inode, 123 .clear_inode = affs_clear_inode,
123 .put_super = affs_put_super, 124 .put_super = affs_put_super,