Re: [PATCH] fs/9p: Initialize status in v9fs_file_do_lock.

2015-01-09 Thread Dominique Martinet
Kirill A. Shutemov wrote on Fri, Jan 09, 2015 at 03:20:51PM +0200: > > Your patch will not BUG() if status is junk, BUT if status uninitialized > > value is 0 and p9_client_lock_dotl then we'll return res=0 (success) and > > not unlock before returning. My patch makes sure we'll return -ENOLCK. >

Re: [PATCH] fs/9p: Initialize status in v9fs_file_do_lock.

2015-01-09 Thread Kirill A. Shutemov
On Fri, Jan 09, 2015 at 02:07:23PM +0100, Dominique Martinet wrote: > Kirill A. Shutemov wrote on Fri, Jan 09, 2015 at 02:33:53PM +0200: > > On Fri, Jan 09, 2015 at 12:56:07PM +0100, Dominique Martinet wrote: > > > If p9_client_lock_dotl returns an error, status is possibly never filled > > > but

Re: [PATCH] fs/9p: Initialize status in v9fs_file_do_lock.

2015-01-09 Thread Dominique Martinet
Kirill A. Shutemov wrote on Fri, Jan 09, 2015 at 02:33:53PM +0200: > On Fri, Jan 09, 2015 at 12:56:07PM +0100, Dominique Martinet wrote: > > If p9_client_lock_dotl returns an error, status is possibly never filled > > but will be used in the following switch. > > Initializing it to P9_LOCK_ERROR

Re: [PATCH] fs/9p: Initialize status in v9fs_file_do_lock.

2015-01-09 Thread Kirill A. Shutemov
On Fri, Jan 09, 2015 at 12:56:07PM +0100, Dominique Martinet wrote: > If p9_client_lock_dotl returns an error, status is possibly never filled > but will be used in the following switch. > Initializing it to P9_LOCK_ERROR makes sur we will return an error and > cleanup (and not hit the default

Re: [PATCH] fs/9p: Initialize status in v9fs_file_do_lock.

2015-01-09 Thread Dominique Martinet
Kirill A. Shutemov wrote on Fri, Jan 09, 2015 at 02:33:53PM +0200: On Fri, Jan 09, 2015 at 12:56:07PM +0100, Dominique Martinet wrote: If p9_client_lock_dotl returns an error, status is possibly never filled but will be used in the following switch. Initializing it to P9_LOCK_ERROR makes

Re: [PATCH] fs/9p: Initialize status in v9fs_file_do_lock.

2015-01-09 Thread Kirill A. Shutemov
On Fri, Jan 09, 2015 at 02:07:23PM +0100, Dominique Martinet wrote: Kirill A. Shutemov wrote on Fri, Jan 09, 2015 at 02:33:53PM +0200: On Fri, Jan 09, 2015 at 12:56:07PM +0100, Dominique Martinet wrote: If p9_client_lock_dotl returns an error, status is possibly never filled but will be

Re: [PATCH] fs/9p: Initialize status in v9fs_file_do_lock.

2015-01-09 Thread Dominique Martinet
Kirill A. Shutemov wrote on Fri, Jan 09, 2015 at 03:20:51PM +0200: Your patch will not BUG() if status is junk, BUT if status uninitialized value is 0 and p9_client_lock_dotl then we'll return res=0 (success) and not unlock before returning. My patch makes sure we'll return -ENOLCK. No,

Re: [PATCH] fs/9p: Initialize status in v9fs_file_do_lock.

2015-01-09 Thread Kirill A. Shutemov
On Fri, Jan 09, 2015 at 12:56:07PM +0100, Dominique Martinet wrote: If p9_client_lock_dotl returns an error, status is possibly never filled but will be used in the following switch. Initializing it to P9_LOCK_ERROR makes sur we will return an error and cleanup (and not hit the default case).