All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC][exofs] locking for sbi->s_nextid?
@ 2015-12-05 23:56 Al Viro
  2015-12-06 16:07 ` Boaz Harrosh
  0 siblings, 1 reply; 2+ messages in thread
From: Al Viro @ 2015-12-05 23:56 UTC (permalink / raw)
  To: Boaz Harrosh; +Cc: osd-dev, linux-fsdevel

	Looks like exofs_new_inode() does this

        inode->i_ino = sbi->s_nextid++;

without any locking; sure, the parent directory is locked, but that's not
worth much on a filesystem that supports mkdir()...  Am I missing something
subtle here?  Another question in the code nearby:

        ret = ore_get_io_state(&sbi->layout, &oi->oc, &ios);
        if (unlikely(ret)) {
                EXOFS_ERR("exofs_new_inode: ore_get_io_state failed\n");
                return ERR_PTR(ret);
        }

aren't we leaking a struct inode here?  Path around ore_create() is
also interesting - looks like its failure causes a leak (at least if
it happens early on)...

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-06 16:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-05 23:56 [RFC][exofs] locking for sbi->s_nextid? Al Viro
2015-12-06 16:07 ` Boaz Harrosh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.