Re: [PATCH] mqueue: sys_mq_open: do not call mnt_drop_write() if read-only

2013-03-19 Thread Vladimir Davydov
On Mar 20, 2013, at 1:09 AM, Andrew Morton wrote: > On Tue, 19 Mar 2013 13:31:18 +0400 Vladimir Davydov > wrote: > >> mnt_drop_write() must be called only if mnt_want_write() succeeded, >> otherwise the mnt_writers counter will diverge. >> >> ... >> >> --- a/ipc/mqueue.c >> +++ b/ipc/mqueue

Re: [PATCH] mqueue: sys_mq_open: do not call mnt_drop_write() if read-only

2013-03-19 Thread Andrew Morton
On Tue, 19 Mar 2013 13:31:18 +0400 Vladimir Davydov wrote: > mnt_drop_write() must be called only if mnt_want_write() succeeded, > otherwise the mnt_writers counter will diverge. > > ... > > --- a/ipc/mqueue.c > +++ b/ipc/mqueue.c > @@ -840,7 +840,8 @@ out_putfd: > fd = error; >

[PATCH] mqueue: sys_mq_open: do not call mnt_drop_write() if read-only

2013-03-19 Thread Vladimir Davydov
mnt_drop_write() must be called only if mnt_want_write() succeeded, otherwise the mnt_writers counter will diverge. Signed-off-by: Vladimir Davydov Cc: Doug Ledford Cc: Andrew Morton Cc: KOSAKI Motohiro Cc: "Eric W. Biederman" --- ipc/mqueue.c |3 ++- 1 files changed, 2 insertions(+), 1