aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/dir.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2008-05-01 10:53:28 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2008-05-01 10:53:28 -0400
commit590fe34c47cb5c2d836ac76fabc5f160bf31a3f1 (patch)
tree9a5d9a855629b916597582796391564891acf9a4 /fs/jffs2/dir.c
parent4e571aba7bb25a3a069a7b88c0f63fe5a14c05c6 (diff)
[JFFS2] Quiet lockdep false positive.
Don't hold f->sem while calling into jffs2_do_create(). It makes lockdep unhappy, and we don't really need it -- the _reason_ it's a false positive is because nobody else can see this inode yet and so nobody will be trying to lock it anyway. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'fs/jffs2/dir.c')
-rw-r--r--fs/jffs2/dir.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/jffs2/dir.c b/fs/jffs2/dir.c
index c63e7a96af0..2bba3d3435b 100644
--- a/fs/jffs2/dir.c
+++ b/fs/jffs2/dir.c
@@ -208,6 +208,13 @@ static int jffs2_create(struct inode *dir_i, struct dentry *dentry, int mode,
208 f = JFFS2_INODE_INFO(inode); 208 f = JFFS2_INODE_INFO(inode);
209 dir_f = JFFS2_INODE_INFO(dir_i); 209 dir_f = JFFS2_INODE_INFO(dir_i);
210 210
211 /* jffs2_do_create() will want to lock it, _after_ reserving
212 space and taking c-alloc_sem. If we keep it locked here,
213 lockdep gets unhappy (although it's a false positive;
214 nothing else will be looking at this inode yet so there's
215 no chance of AB-BA deadlock involving its f->sem). */
216 mutex_unlock(&f->sem);
217
211 ret = jffs2_do_create(c, dir_f, f, ri, 218 ret = jffs2_do_create(c, dir_f, f, ri,
212 dentry->d_name.name, dentry->d_name.len); 219 dentry->d_name.name, dentry->d_name.len);
213 if (ret) 220 if (ret)