unlock page lock before doing a dq
PATCH 1/1 unlock page lock before doing a dq
Hello,
There is a lockup condition where we get an error while perparing to write (such as ENOSPC) and we go to do the gfs2_glock_dq_m and the glock has been marked dirty. Since we are already holding the page lock, we will deadlock because we will try to flush all the pages back to disk and try to take the pagelock again. Wendy you said I would be doing this in a transaction, but if there as error inside where we started the transaction, we goto out, where we stop the transaction first and then go on and unlock the page. This fixes RH bz 280791. Thank you,
Josef
fs/gfs2/ops_address.c renamed from fs/gfs2/ops_address.c.josef +2 -0
@@ -457,8 +457,10 @@ out_alloc_put:gfs2_alloc_put (ip); } out_unlock: +unlock_page (page);gfs2_glock_dq_m (1 , &ip->i_gh);gfs2_holder_uninit (&ip->i_gh); +lock_page (page); }return error;
PATCH 1/1 unlock page lock before doing a dq
Hi,
The bug has been verified not to exist on the latest kernel, so I don't think we need this patch,
Steve.
Quoted 27 lines · Josef Bacik
Hello,
There is a lockup condition where we get an error while perparing to write (such as ENOSPC) and we go to do the
gfs2_glock_dq_mand the glock has been marked dirty. Since we are already holding the page lock, we will deadlock because we will try to flush all the pages back to disk and try to take the pagelock again. Wendy you said I would be doing this in a transaction, but if there as error inside where we started the transaction, we goto out, where we stop the transaction first and then go on and unlock the page. This fixes RH bz 280791. Thank you,Josef
fs/gfs2/ops_address.c renamed from fs/gfs2/ops_address.c.josef +2
-0@@ -457,8 +457,10 @@ out_alloc_put:gfs2_alloc_put (ip); } out_unlock: +unlock_page (page);gfs2_glock_dq_m (1 , &ip->i_gh);gfs2_holder_uninit (&ip->i_gh); +lock_page (page); }return error;