diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-10-23 15:23:40 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-10-25 21:24:15 -0400 |
commit | 756acc2d61712a8cafe2aa6ad626c60a185d3645 (patch) | |
tree | 72473307f7789b2dafa4b7ca2facc6427f83a283 /fs | |
parent | 1d3382cbf02986e4833849f528d451367ea0b4cb (diff) |
list.h: new helper - hlist_add_fake()
Make node look as if it was on hlist, with hlist_del()
working correctly. Usable without any locking...
Convert a couple of places where we want to do that to
inode->i_hash.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/hfsplus/inode.c | 2 | ||||
-rw-r--r-- | fs/jfs/jfs_imap.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c index 78449280dae0..8afd7e84f98d 100644 --- a/fs/hfsplus/inode.c +++ b/fs/hfsplus/inode.c | |||
@@ -211,7 +211,7 @@ static struct dentry *hfsplus_file_lookup(struct inode *dir, struct dentry *dent | |||
211 | * appear hashed, but do not put on any lists. hlist_del() | 211 | * appear hashed, but do not put on any lists. hlist_del() |
212 | * will work fine and require no locking. | 212 | * will work fine and require no locking. |
213 | */ | 213 | */ |
214 | inode->i_hash.pprev = &inode->i_hash.next; | 214 | hlist_add_fake(&inode->i_hash); |
215 | 215 | ||
216 | mark_inode_dirty(inode); | 216 | mark_inode_dirty(inode); |
217 | out: | 217 | out: |
diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c index f8332dc8eeb2..3a09423b6c22 100644 --- a/fs/jfs/jfs_imap.c +++ b/fs/jfs/jfs_imap.c | |||
@@ -497,7 +497,7 @@ struct inode *diReadSpecial(struct super_block *sb, ino_t inum, int secondary) | |||
497 | * appear hashed, but do not put on any lists. hlist_del() | 497 | * appear hashed, but do not put on any lists. hlist_del() |
498 | * will work fine and require no locking. | 498 | * will work fine and require no locking. |
499 | */ | 499 | */ |
500 | ip->i_hash.pprev = &ip->i_hash.next; | 500 | hlist_add_fake(&ip->i_hash); |
501 | 501 | ||
502 | return (ip); | 502 | return (ip); |
503 | } | 503 | } |