potential null derefs in fs/btrfs/relocation.c

2010-05-29 Thread Dan Carpenter
Hi hi, Still going through some more smatch stuff and there are two potential null dereferences in fs/btrfs/relocation.c This was introduced by 3fd0a5585e: Btrfs: Metadata ENOSPC handling for balance fs/btrfs/relocation.c +791 build_backref_tree(142) warn: variable dereferenced before

[patch 1/11] btrfs: handle error returns from btrfs_lookup_dir_item()

2010-05-29 Thread Dan Carpenter
If btrfs_lookup_dir_item() fails, we should can just let the mount fail with an error. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index d34b2df..28b53f1 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -360,6 +360,8 @@ static struct

[patch 3/11] btrfs: handle kzalloc() failure in open_ctree()

2010-05-29 Thread Dan Carpenter
Unwind and return -ENOMEM if the allocation fails here. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index f3b287c..73895ba 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1941,8 +1941,11 @@ struct btrfs_root *open_ctree(struct

[patch 7/11] btrfs: unwind after btrfs_start_transaction() errors

2010-05-29 Thread Dan Carpenter
This was added by a22285a6a3: Btrfs: Integrate metadata reservation with start_transaction. If we goto out here then we skip all the unwinding and there are locks still held etc. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index

[patch 8/11] btrfs: btrfs_lookup_dir_item() can return ERR_PTR

2010-05-29 Thread Dan Carpenter
btrfs_lookup_dir_item() can return either ERR_PTRs or null. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 9f9a1d9..4dbaf89 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -1845,7 +1845,7 @@ static long

[patch 9/11] btrfs: silence sparse warnings in ioctl.c

2010-05-29 Thread Dan Carpenter
I fixed the following sparse warnings: fs/btrfs/ioctl.c:1936:22: warning: cast removes address space of expression fs/btrfs/ioctl.c:1939:26: warning: incorrect type in argument 1 (different address spaces) fs/btrfs/ioctl.c:1939:26:expected void [noderef] asn:1*to fs/btrfs/ioctl.c:1939:26:

[patch 11/11] btrfs: The file argument for fsync() is never null

2010-05-29 Thread Dan Carpenter
The file argument for fsync is never null so we can remove this check. What drew my attention here is that 7ea8085910e: drop unused dentry argument to -fsync introduced an unconditional dereference at the start of the function and that generated a smatch warning. Signed-off-by: Dan Carpenter

RE: Hey, Opt In Email Lists Give Away!

2010-05-29 Thread Sam L. Carl
Hey, You have to check this out if your a webmaster. http://www.traffictractor.com is giving away thousands of opt in emails. This is huge! Everyone is talking about it now. With these opt in email addresses you can do so much. It takes years and a lot of money to build a list from scratch

Re: [patch 5/11] btrfs: remove unneeded null check in btrfs_rename()

2010-05-29 Thread Mike Fedyk
On Sat, May 29, 2010 at 2:45 AM, Dan Carpenter erro...@gmail.com wrote: old_inode cannot be null here, because we dereference it unconditionally throughout the function. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index fa6ccc1..0bc29be

Re: [patch 5/11] btrfs: remove unneeded null check in btrfs_rename()

2010-05-29 Thread Al Viro
On Sat, May 29, 2010 at 11:01:56AM -0700, Mike Fedyk wrote: I think code like this is here because there are still a lot of features that are being added to btrfs and it's easier to have the additional checks than continually adding and removing them as the code changes. _What_ features?

ioctl returns 0 and wrong fs type on disk addition

2010-05-29 Thread Yee-Ting Li
using v0.19 on ubuntu 10.4 i have a raid0 meta and data across 2 drives (sdf, sdg); i recently added another drive to the mix using 'btrfs-vol -a /dev/sde'. it returned 'ioctl returns 0'. i didn't think anything of it as the extra disk showed up. i did not do a rebalance. but i did write