Re: missing mnt_drop_write() on open error

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Dave Hansen
Date: Wednesday, September 26, 2007 - 11:08 am

On Wed, 2007-09-26 at 19:50 +0200, Miklos Szeredi wrote:

I'll explore that.  It may make very good sense.


What's the path to may_open() in that case?  open_namei() should wrap
all callers other than nfs, and it does:

	/* O_TRUNC implies we need access checks for write permissions */
        if (flag & O_TRUNC)
                acc_mode |= MAY_WRITE;

Which should trigger the may_open() code.  

later in open_namei():
...
ok:
        error = may_open(nd, acc_mode, flag);
        if (error)
                goto exit;
        return 0;


-- Dave

-
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, 4:14 pm)
Re: missing mnt_drop_write() on open error, Dave Hansen, (Tue Sep 25, 4:24 pm)
Re: missing mnt_drop_write() on open error, Dave Hansen, (Tue Sep 25, 6:21 pm)
Re: missing mnt_drop_write() on open error, Miklos Szeredi, (Wed Sep 26, 1:38 am)
Re: missing mnt_drop_write() on open error, Christoph Hellwig, (Wed Sep 26, 8:07 am)
Re: missing mnt_drop_write() on open error, Dave Hansen, (Wed Sep 26, 9:14 am)
Re: missing mnt_drop_write() on open error, Dave Hansen, (Wed Sep 26, 9:19 am)
Re: missing mnt_drop_write() on open error, Miklos Szeredi, (Wed Sep 26, 10:50 am)
Re: missing mnt_drop_write() on open error, Dave Hansen, (Wed Sep 26, 11:08 am)
Re: missing mnt_drop_write() on open error, Miklos Szeredi, (Wed Sep 26, 11:54 am)