[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <16823.1433173503@warthog.procyon.org.uk>
Date: Mon, 01 Jun 2015 16:45:03 +0100
From: David Howells <dhowells@...hat.com>
To: Miklos Szeredi <miklos@...redi.hu>
Cc: dhowells@...hat.com, Al Viro <viro@...iv.linux.org.uk>,
Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux-Fsdevel <linux-fsdevel@...r.kernel.org>,
"linux-unionfs@...r.kernel.org" <linux-unionfs@...r.kernel.org>
Subject: Re: Can ovl_drop_write() be called earlier in ovl_dentry_open()
Miklos Szeredi <miklos@...redi.hu> wrote:
> > In ovl_dentry_open(), ovl_drop_write() is called after vfs_open() - but is
> > this actually necessary? Can't we just drop it post-copyup? After all,
> > that's all we wanted the write lock for, right?
>
> Hmm, that could result in a race where remount r/o of upper fs comes
> in between copy-up and vfs_open() so copy-up succeeds but the actual
> open fails. It's harmless, though, and not very likely. So I guess
> your patch is OK.
That race is there anyway if there's no copy up, right?
David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists