* [josef-btrfs:master 9/11] fs/btrfs/delayed-inode.c:1013:1-11: second lock on line 1013
@ 2012-08-03 13:16 Fengguang Wu
2012-08-03 21:11 ` Josef Bacik
2012-08-04 7:43 ` Fengguang Wu
0 siblings, 2 replies; 3+ messages in thread
From: Fengguang Wu @ 2012-08-03 13:16 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 978 bytes --]
Hi Josef,
There are (old) coccinelle warnings in
tree: git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git master
head: 233564d3f5bde271885f5b784b63cfe627bba0a5
commit: ec93ee7ac77b2e95934253823918c3c684c1a36c [9/11] Btrfs: barrier before waitqueue_active
All coccinelle warnings:
+ fs/btrfs/delayed-inode.c:1013:1-11: second lock on line 1013
--
+ fs/btrfs/volumes.c:2888:1-3: WARNING: PTR_RET can be used (patch attached)
vim +1013 fs/btrfs/delayed-inode.c
1010 int ret = 0;
1011
1012 do_again:
> 1013 mutex_lock(&node->mutex);
1014 curr = __btrfs_first_delayed_deletion_item(node);
1015 if (!curr)
1016 goto delete_fail;
...
1031 if (curr)
> 1032 goto do_again;
1033 else
1034 goto delete_fail;
---
0-DAY kernel build testing backend Open Source Technology Centre
Fengguang Wu <wfg@linux.intel.com> Intel Corporation
[-- Attachment #2: ptr_ret:volumes.patch --]
[-- Type: text/x-diff, Size: 413 bytes --]
Generated by: api/ptr_ret.cocci
Use PTR_RET rather than if(IS_ERR(...)) + PTR_ERR
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2885,10 +2885,7 @@ int btrfs_resume_balance_async(struct bt
}
tsk = kthread_run(balance_kthread, fs_info, "btrfs-balance");
- if (IS_ERR(tsk))
- return PTR_ERR(tsk);
-
- return 0;
+ return PTR_RET(tsk);
}
int btrfs_recover_balance(struct btrfs_fs_info *fs_info)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [josef-btrfs:master 9/11] fs/btrfs/delayed-inode.c:1013:1-11: second lock on line 1013
2012-08-03 13:16 [josef-btrfs:master 9/11] fs/btrfs/delayed-inode.c:1013:1-11: second lock on line 1013 Fengguang Wu
@ 2012-08-03 21:11 ` Josef Bacik
2012-08-04 7:43 ` Fengguang Wu
1 sibling, 0 replies; 3+ messages in thread
From: Josef Bacik @ 2012-08-03 21:11 UTC (permalink / raw)
To: kernel-janitors
On Fri, Aug 03, 2012 at 07:16:59AM -0600, Fengguang Wu wrote:
> Hi Josef,
>
> There are (old) coccinelle warnings in
>
> tree: git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git master
> head: 233564d3f5bde271885f5b784b63cfe627bba0a5
> commit: ec93ee7ac77b2e95934253823918c3c684c1a36c [9/11] Btrfs: barrier before waitqueue_active
>
> All coccinelle warnings:
>
> + fs/btrfs/delayed-inode.c:1013:1-11: second lock on line 1013
> --
> + fs/btrfs/volumes.c:2888:1-3: WARNING: PTR_RET can be used (patch attached)
>
> vim +1013 fs/btrfs/delayed-inode.c
> 1010 int ret = 0;
> 1011
> 1012 do_again:
> > 1013 mutex_lock(&node->mutex);
> 1014 curr = __btrfs_first_delayed_deletion_item(node);
> 1015 if (!curr)
> 1016 goto delete_fail;
> ...
> 1031 if (curr)
> > 1032 goto do_again;
> 1033 else
> 1034 goto delete_fail;
>
Ok that wasn't related to my patch so I'm not going to fold it in, do you want
to send me a real patch with a Signed-off-by that I can apply? Thanks,
Josef
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [josef-btrfs:master 9/11] fs/btrfs/delayed-inode.c:1013:1-11: second lock on line 1013
2012-08-03 13:16 [josef-btrfs:master 9/11] fs/btrfs/delayed-inode.c:1013:1-11: second lock on line 1013 Fengguang Wu
2012-08-03 21:11 ` Josef Bacik
@ 2012-08-04 7:43 ` Fengguang Wu
1 sibling, 0 replies; 3+ messages in thread
From: Fengguang Wu @ 2012-08-04 7:43 UTC (permalink / raw)
To: kernel-janitors
On Fri, Aug 03, 2012 at 05:11:32PM -0400, Josef Bacik wrote:
> On Fri, Aug 03, 2012 at 07:16:59AM -0600, Fengguang Wu wrote:
> > Hi Josef,
> >
> > There are (old) coccinelle warnings in
> >
> > tree: git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git master
> > head: 233564d3f5bde271885f5b784b63cfe627bba0a5
> > commit: ec93ee7ac77b2e95934253823918c3c684c1a36c [9/11] Btrfs: barrier before waitqueue_active
> >
> > All coccinelle warnings:
> >
> > + fs/btrfs/delayed-inode.c:1013:1-11: second lock on line 1013
> > --
> > + fs/btrfs/volumes.c:2888:1-3: WARNING: PTR_RET can be used (patch attached)
> >
> > vim +1013 fs/btrfs/delayed-inode.c
> > 1010 int ret = 0;
> > 1011
> > 1012 do_again:
> > > 1013 mutex_lock(&node->mutex);
> > 1014 curr = __btrfs_first_delayed_deletion_item(node);
> > 1015 if (!curr)
> > 1016 goto delete_fail;
> > ...
> > 1031 if (curr)
> > > 1032 goto do_again;
> > 1033 else
> > 1034 goto delete_fail;
> >
>
> Ok that wasn't related to my patch so I'm not going to fold it in, do you want
> to send me a real patch with a Signed-off-by that I can apply? Thanks,
Sure. I'll send one bug fix and another code cleanup for each of the
warnings.
Thanks,
Fengguang
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-08-04 7:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-03 13:16 [josef-btrfs:master 9/11] fs/btrfs/delayed-inode.c:1013:1-11: second lock on line 1013 Fengguang Wu
2012-08-03 21:11 ` Josef Bacik
2012-08-04 7:43 ` Fengguang Wu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).