Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217794
b: refs/heads/master
c: 756acc2
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Oct 26, 2010
1 parent 92377da commit 661aee9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 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: 1d3382cbf02986e4833849f528d451367ea0b4cb
refs/heads/master: 756acc2d61712a8cafe2aa6ad626c60a185d3645
2 changes: 1 addition & 1 deletion trunk/fs/hfsplus/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ static struct dentry *hfsplus_file_lookup(struct inode *dir, struct dentry *dent
* appear hashed, but do not put on any lists. hlist_del()
* will work fine and require no locking.
*/
inode->i_hash.pprev = &inode->i_hash.next;
hlist_add_fake(&inode->i_hash);

mark_inode_dirty(inode);
out:
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/jfs/jfs_imap.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ struct inode *diReadSpecial(struct super_block *sb, ino_t inum, int secondary)
* appear hashed, but do not put on any lists. hlist_del()
* will work fine and require no locking.
*/
ip->i_hash.pprev = &ip->i_hash.next;
hlist_add_fake(&ip->i_hash);

return (ip);
}
Expand Down
6 changes: 6 additions & 0 deletions trunk/include/linux/list.h
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,12 @@ static inline void hlist_add_after(struct hlist_node *n,
next->next->pprev = &next->next;
}

/* after that we'll appear to be on some hlist and hlist_del will work */
static inline void hlist_add_fake(struct hlist_node *n)
{
n->pprev = &n->next;
}

/*
* Move a list from one list head to another. Fixup the pprev
* reference of the first entry if it exists.
Expand Down

0 comments on commit 661aee9

Please sign in to comment.