diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-27 22:37:21 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-27 22:37:21 -0500 |
commit | 634095dab2a2001844fc8b26673c0cb14a766cdf (patch) | |
tree | 1e5aa7581ac97f82543dfc581c5eb6fa96572d3c /fs/9p/fid.c | |
parent | 6131ffaa1f091415b7a24abb01f033d9c0a727f4 (diff) | |
download | op-kernel-dev-634095dab2a2001844fc8b26673c0cb14a766cdf.zip op-kernel-dev-634095dab2a2001844fc8b26673c0cb14a766cdf.tar.gz |
9p: don't bother with private lock in ->d_fsdata; dentry->d_lock will do just fine
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/9p/fid.c')
-rw-r--r-- | fs/9p/fid.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/9p/fid.c b/fs/9p/fid.c index afd4724..71bc36a 100644 --- a/fs/9p/fid.c +++ b/fs/9p/fid.c @@ -54,14 +54,13 @@ int v9fs_fid_add(struct dentry *dentry, struct p9_fid *fid) if (!dent) return -ENOMEM; - spin_lock_init(&dent->lock); INIT_LIST_HEAD(&dent->fidlist); dentry->d_fsdata = dent; } - spin_lock(&dent->lock); + spin_lock(&dentry->d_lock); list_add(&fid->dlist, &dent->fidlist); - spin_unlock(&dent->lock); + spin_unlock(&dentry->d_lock); return 0; } @@ -85,14 +84,14 @@ static struct p9_fid *v9fs_fid_find(struct dentry *dentry, kuid_t uid, int any) dent = (struct v9fs_dentry *) dentry->d_fsdata; ret = NULL; if (dent) { - spin_lock(&dent->lock); + spin_lock(&dentry->d_lock); list_for_each_entry(fid, &dent->fidlist, dlist) { if (any || uid_eq(fid->uid, uid)) { ret = fid; break; } } - spin_unlock(&dent->lock); + spin_unlock(&dentry->d_lock); } return ret; |