summaryrefslogtreecommitdiff
path: root/fs/affs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-06-09 13:06:09 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-14 16:32:52 +0400
commit12447c40394695c9a19920c65fea124bdf3ea034 (patch)
tree7c689ede79d1b61986706a94b588116b4e5f4288 /fs/affs
parent3084ee95f08ce353ae26c18c7627c4e9786983ca (diff)
downloadlinux-3.10-12447c40394695c9a19920c65fea124bdf3ea034.tar.gz
linux-3.10-12447c40394695c9a19920c65fea124bdf3ea034.tar.bz2
linux-3.10-12447c40394695c9a19920c65fea124bdf3ea034.zip
affs: unobfuscate affs_fix_dcache()
and add a comment on what it's doing Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/affs')
-rw-r--r--fs/affs/amigaffs.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/affs/amigaffs.c b/fs/affs/amigaffs.c
index 1c7fd7928d1..843cdc99480 100644
--- a/fs/affs/amigaffs.c
+++ b/fs/affs/amigaffs.c
@@ -122,15 +122,13 @@ affs_remove_hash(struct inode *dir, struct buffer_head *rem_bh)
}
static void
-affs_fix_dcache(struct dentry *dentry, u32 entry_ino)
+affs_fix_dcache(struct inode *inode, u32 entry_ino)
{
- struct inode *inode = dentry->d_inode;
- void *data = dentry->d_fsdata;
-
+ struct dentry *dentry;
spin_lock(&inode->i_lock);
list_for_each_entry(dentry, &inode->i_dentry, d_alias) {
if (entry_ino == (u32)(long)dentry->d_fsdata) {
- dentry->d_fsdata = data;
+ dentry->d_fsdata = (void *)inode->i_ino;
break;
}
}
@@ -172,7 +170,11 @@ affs_remove_link(struct dentry *dentry)
}
affs_lock_dir(dir);
- affs_fix_dcache(dentry, link_ino);
+ /*
+ * if there's a dentry for that block, make it
+ * refer to inode itself.
+ */
+ affs_fix_dcache(inode, link_ino);
retval = affs_remove_hash(dir, link_bh);
if (retval) {
affs_unlock_dir(dir);