Re: missing mnt_drop_write() on open error

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <haveblue@...>
Cc: <miklos@...>, <akpm@...>, <linux-kernel@...>
Date: Wednesday, September 26, 2007 - 4:38 am

> On Wed, 2007-09-26 at 01:14 +0200, Miklos Szeredi wrote:

It didn't fix it for me, but the patch looks OK.

In __dentry_open() there's still a few places where fput() won't be
called, notably when ->open fails, which is what I'm triggering I
think.

Also even more horrible things can happen because of the
nd->intent.open.file thing.  For example if the lookup routine calls
lookup_instantiate_filp(), and after this, but before may_open() some
error happens, then release_open_intent() will call fput() on the
file, which will cause mnt_drop_write() to be called, even though a
matching mnt_want_write() hasn't yet been called.  Ugly, eh?


Yeah, something needs to be done with open, because currently it's way
too convoluted.

Miklos
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
missing mnt_drop_write() on open error, Miklos Szeredi, (Tue Sep 25, 7:14 pm)
Re: missing mnt_drop_write() on open error, Dave Hansen, (Tue Sep 25, 9:21 pm)
Re: missing mnt_drop_write() on open error, Miklos Szeredi, (Wed Sep 26, 4:38 am)
Re: missing mnt_drop_write() on open error, Dave Hansen, (Wed Sep 26, 12:19 pm)
Re: missing mnt_drop_write() on open error, Miklos Szeredi, (Wed Sep 26, 1:50 pm)
Re: missing mnt_drop_write() on open error, Dave Hansen, (Wed Sep 26, 2:08 pm)
Re: missing mnt_drop_write() on open error, Miklos Szeredi, (Wed Sep 26, 2:54 pm)
Re: missing mnt_drop_write() on open error, Dave Hansen, (Wed Sep 26, 12:14 pm)
Re: missing mnt_drop_write() on open error, Christoph Hellwig, (Wed Sep 26, 11:07 am)
Re: missing mnt_drop_write() on open error, Dave Hansen, (Tue Sep 25, 7:24 pm)