On 2013/5/9 3:38, Andrew Morton wrote:
> On Mon, 6 May 2013 22:43:39 +0800 Joseph Qi wrote:
>
>> In ocfs2_file_aio_write, it does ocfs2_rw_lock first and then
>> ocfs2_inode_lock. But if ocfs2_inode_lock failed, it goes to out_sems
>> without unlocking rw lock. This will cause a bug in ocfs2_lock
It should almost never trigger. ocfs2_inode_lock() should always succeed and
only return after it has gotten the required lock.
On Wed, May 8, 2013 at 12:38 PM, Andrew Morton wrote:
> On Mon, 6 May 2013 22:43:39 +0800 Joseph Qi wrote:
>
> > In ocfs2_file_aio_write, it does ocfs2_rw_lock first a
On Mon, 6 May 2013 22:43:39 +0800 Joseph Qi wrote:
> In ocfs2_file_aio_write, it does ocfs2_rw_lock first and then
> ocfs2_inode_lock. But if ocfs2_inode_lock failed, it goes to out_sems
> without unlocking rw lock. This will cause a bug in ocfs2_lock_res_free
> when testing res->l_ex_holders, wh
Looks good to me.
Acked-by: Sunil Mushran
On Mon, May 6, 2013 at 7:43 AM, Joseph Qi wrote:
> In ocfs2_file_aio_write, it does ocfs2_rw_lock first and then
> ocfs2_inode_lock. But if ocfs2_inode_lock failed, it goes to out_sems
> without unlocking rw lock. This will cause a bug in ocfs2_lock_r
In ocfs2_file_aio_write, it does ocfs2_rw_lock first and then
ocfs2_inode_lock. But if ocfs2_inode_lock failed, it goes to out_sems
without unlocking rw lock. This will cause a bug in ocfs2_lock_res_free
when testing res->l_ex_holders, which is increased in
__ocfs2_cluster_lock and decreased in __o