aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-10-23 15:19:20 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-10-25 21:24:15 -0400
commit1d3382cbf02986e4833849f528d451367ea0b4cb (patch)
treeb754f9903c0f77ce40dcff18030b49d0ce213eab /mm
parenta8dade34e3df581bc36ca2afe6e27055e178801c (diff)
downloadkernel_goldelico_gta04-1d3382cbf02986e4833849f528d451367ea0b4cb.zip
kernel_goldelico_gta04-1d3382cbf02986e4833849f528d451367ea0b4cb.tar.gz
kernel_goldelico_gta04-1d3382cbf02986e4833849f528d451367ea0b4cb.tar.bz2
new helper: inode_unhashed()
note: for race-free uses you inode_lock held Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'mm')
-rw-r--r--mm/shmem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index 080b09a..27a5812 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -2146,7 +2146,7 @@ static int shmem_encode_fh(struct dentry *dentry, __u32 *fh, int *len,
if (*len < 3)
return 255;
- if (hlist_unhashed(&inode->i_hash)) {
+ if (inode_unhashed(inode)) {
/* Unfortunately insert_inode_hash is not idempotent,
* so as we hash inodes here rather than at creation
* time, we need a lock to ensure we only try
@@ -2154,7 +2154,7 @@ static int shmem_encode_fh(struct dentry *dentry, __u32 *fh, int *len,
*/
static DEFINE_SPINLOCK(lock);
spin_lock(&lock);
- if (hlist_unhashed(&inode->i_hash))
+ if (inode_unhashed(inode))
__insert_inode_hash(inode,
inode->i_ino + inode->i_generation);
spin_unlock(&lock);