[Ocfs2-devel] [PATCH v2] ocfs2: fix mutex_unlock and possible memory leak in ocfs2_remove_btree_range

2013-06-10 Thread Joseph Qi
. Signed-off-by: Joseph Qi joseph...@huawei.com --- fs/ocfs2/alloc.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index b8a9d87..17e6bdd 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c @@ -5655,7 +5655,7 @@ int

Re: [Ocfs2-devel] ocfs2: kernel BUG at fs/ocfs2/buffer_head_io.c

2013-06-01 Thread Joseph Qi
at 11:38:49AM +0800, Joseph Qi wrote: Anyone can give me some advice? On 2013/5/26 20:21, Joseph Qi wrote: I have triggered a BUG at buffer_head_io.c. Belowing is the code where the BUG is triggered: if (buffer_needs_validate(bh)) { /* We never set NeedsValidate if the * buffer

Re: [Ocfs2-devel] [PATCH] ocfs2: should not use le32_add_cpu to set ocfs2_dinode i_flags

2013-05-29 Thread Joseph Qi
You are right. Thanks for your review comments. I will do the corresponding modification and resend the patch. On 2013/5/29 18:17, Jeff Liu wrote: On 05/29/2013 04:12 PM, shencanquan wrote: On 2013/5/29 15:57, Jeff Liu wrote: Thanks for your patch, Joseph. On 05/29/2013 10:42 AM, Joseph Qi

[Ocfs2-devel] [PATCH] ocfs2: should not use le32_add_cpu to set ocfs2_dinode i_flags

2013-05-28 Thread Joseph Qi
If we use le32_add_cpu to set ocfs2_dinode i_flags, it may lead to the corresponding flag corrupted. So we should change it to bitwise and/or operation. Signed-off-by: Joseph Qi joseph...@huawei.com --- fs/ocfs2/namei.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

Re: [Ocfs2-devel] ocfs2: kernel BUG at fs/ocfs2/buffer_head_io.c

2013-05-28 Thread Joseph Qi
Anyone can give me some advice? On 2013/5/26 20:21, Joseph Qi wrote: I have triggered a BUG at buffer_head_io.c. Belowing is the code where the BUG is triggered: if (buffer_needs_validate(bh)) { /* We never set NeedsValidate if the * buffer was held by the journal, so

Re: [Ocfs2-devel] [patch 1/4] ocfs2: fix a couple of memory leaks at o2hb_map_slot_data()

2013-05-27 Thread Joseph Qi
These memory will be freed in o2hb_region_release. If we free them here, then it will lead to double freed issue. This patch can fix a couple of potential memory leaks at o2hb_map_slot_data(). Signed-off-by: Jie Liu jeff.liu at oracle.com --- fs/ocfs2/cluster/heartbeat.c | 33

[Ocfs2-devel] [PATCH] ret should be int instead of enum in dlm_request_all_locks

2013-05-22 Thread Joseph Qi
In dlm_request_all_locks, ret is type enum. But o2net_send_message returns a type int value. Then it will never run into the following error branch. So we should change the ret type from enum to int. Signed-off-by: Joseph Qi joseph...@huawei.com --- fs/ocfs2/dlm/dlmrecovery.c |3 +-- 1 file

[Ocfs2-devel] [PATCH] clean up duplicate declaration in dlmrecovery.c

2013-05-20 Thread Joseph Qi
Below 3 functions have already been declared in dlmcommon.h, so we have no need to declare them again in dlmrecovery.c. dlm_complete_recovery_thread dlm_launch_recovery_thread dlm_kick_recovery_thread Signed-off-by: Joseph Qi joseph...@huawei.com --- fs/ocfs2/dlm/dlmrecovery.c |3 --- 1

[Ocfs2-devel] [PATCH] ocfs2: goto out_unlock if ocfs2_get_clusters_nocache failed in ocfs2_fiemap

2013-05-14 Thread Joseph Qi
ocfs2_get_clusters_nocache failed, it should goto out_unlock instead of out, because we need release buffer head, up read alloc sem and unlock inode. Cc: sta...@vger.kernel.org Signed-off-by: Joseph Qi joseph...@huawei.com --- fs/ocfs2/extent_map.c |2 +- 1 file changed, 1 insertion(+), 1

[Ocfs2-devel] [PATCH v2] ocfs2: goto out_unlock if ocfs2_get_clusters_nocache failed in ocfs2_fiemap

2013-05-14 Thread Joseph Qi
, once ocfs2_get_clusters_nocache failed, it should goto out_unlock instead of out, because we need release buffer head, up read alloc sem and unlock inode. Cc: sta...@vger.kernel.org Signed-off-by: Joseph Qi joseph...@huawei.com Reviewed-by: Jie Liu jeff@oracle.com --- fs/ocfs2/extent_map.c

Re: [Ocfs2-devel] [PATCH] ocfs2: unlock rw lock if inode lock failed

2013-05-13 Thread Joseph Qi
On 2013/5/9 3:38, Andrew Morton wrote: On Mon, 6 May 2013 22:43:39 +0800 Joseph Qi joseph...@huawei.com 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

[Ocfs2-devel] [PATCH v2] ocfs2: fix possible memory leak in dlm_process_recovery_data

2013-05-02 Thread Joseph Qi
We found a possible memory leak in dlm_process_recovery_data when doing code review. In dlm_process_recovery_data, it creates newlock each time, but don't free when it is bad, and then it will lead to memory leak. Cc: sta...@vger.kernel.org Signed-off-by: Joseph Qi joseph...@huawei.com Reviewed

<    1   2   3   4   5