Message ID | 61e099b717000558fec733995211813d1b34b56d.1545126261.git.helmut.grohne@intenta.de |
---|---|
State | New, archived |
Delegated to: | Richard Weinberger |
Headers | show |
Series | [v3,1/3] jffs2: avoid unnecessarily taking f->sem | expand |
diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c index 389ea53ea487..a6718fbfe1fd 100644 --- a/fs/jffs2/readinode.c +++ b/fs/jffs2/readinode.c @@ -1382,12 +1382,10 @@ int jffs2_do_crccheck_inode(struct jffs2_sb_info *c, struct jffs2_inode_cache *i if (!f) return -ENOMEM; - mutex_init(&f->sem); - mutex_lock(&f->sem); f->inocache = ic; ret = jffs2_do_read_inode_internal(c, f, &n); - mutex_unlock(&f->sem); + mutex_init(&f->sem); jffs2_do_clear_inode(c, f); jffs2_xattr_do_crccheck_inode(c, ic); kfree (f);