d it
leads to a use after free inside the btrfs_end_transaction() macro.
Fixes: 340f1aa27f36 ("btrfs: qgroups: Move transaction management inside
btrfs_quota_enable/disable")
Signed-off-by: Dan Carpenter
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index 4353bb69bb86..d4917c0cddf5
The error handling in "goto out;" expects that if "trans" is non-NULL
that means it's valid. Unfortunately it could also be an error pointer.
Fixes: c9a6fe84fe43 ("btrfs: qgroups: Move transaction management inside
btrfs_quota_enable/disable")
Signed-off-by: D
| or perhaps check that both are set?
6389 btrfs_err(fs_info,
6390 "mixed chunk type in non-mixed mode: %llu",
type);
6391 return -EIO;
6392 }
6393 }
regards,
dan carpenter
-
1885 return device;
1886 }
See also:
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
memdup_user() returns error pointers, it doesn't return NULL.
Fixes: 01141b08dee5 ("btrfs: Add unprivileged ioctl which returns subvolume's
ROOT_REF")
Signed-off-by: Dan Carpenter
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index ff5018587bd9..d8dd4504bdab 100644
--- a/fs/btr
goto out;
2483 }
2484
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
75 btrfs_init_dev_replace() warn: test_bit() takes a
bit number
fs/btrfs/dev-replace.c:310 btrfs_dev_name() warn: test_bit() takes a bit number
fs/btrfs/dev-replace.c:570 btrfs_dev_replace_finishing() warn: test_bit() takes
a bit number
regards,
dan carpenter
--
To unsubscribe from this list: send th
read_tree_block() returns error pointers, and never NULL and so I have
updated the error handling.
Fixes: 74739121b4c7 ("Btrfs: add a extent ref verify tool")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/fs/btrfs/ref-verify.c b/fs/btrfs/ref-verify.c
in
2506 blkdev_put(bdev, FMODE_EXCL);
2507 if (seeding_dev && !unlocked) {
2508 mutex_unlock(_mutex);
2509 up_write(>s_umount);
2510 }
2511 return ret;
2512 }
regards,
dan carpenter
--
To unsubscribe from this list
said that a bunch of times. It's like bashing my face into the
keyboard for all the good it does. On the other hand, some people
accept these oddly placed labels... No one else writes code like this
so far as I know.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "
reviewing this and I missed that issue. These patches are
just exhausting...
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
return;
183
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
continue;
3422 }
3423
3424 set_range_writeback(tree, cur, cur + iosize - 1);
The patch adds a new unchecked dereference.
regards,
dan carpenter
--
To unsubscribe from this list: send the li
This function is supposed to return blk_status_t error codes now but
there was a stray -ENOMEM left behind.
Fixes: 4e4cbee93d56 ("block: switch bios to blk_status_t")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/fs/btrfs/compression.c b/fs/btrfs/com
"item" is never used.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 1e4e4532f381..337aef86dae5 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -5881,7 +5881,6 @@ static int btrfs_real_readdir(struct fi
btrfs_get_extent() never returns NULL pointers, so this code introduces
a static checker warning.
The btrfs_get_extent() is a bit complex, but trust me that it doesn't
return NULLs and also if it did we would trigger the BUG_ON(!em) before
the last return statement.
Signed-off-by: Dan Carpenter
sctx->clone_roots = kzalloc(alloc_size, GFP_KERNEL | __GFP_NOWARN);
Fixes: f5ecec3ce21f ("btrfs: send: silence an integer overflow warning")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 030d592ed1fe..ad9508e67
We accidentally deleted a new line in commit 0921910aa6fe ("btrfs: Make
btrfs_log_inode take btrfs_inode")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index f1dc36a181db..010cf7685677 100644
--- a/fs/btrfs/tre
233 struct btrfs_key key;
234 int name_len;
235 int ret;
236 u64 ino;
237
238 if (!dir || !inode)
^
Old code checked for NULL.
239 return -EINVAL;
240
regards,
dan carpenter
--
t_level] = 0; /* so release_path doesn't try to
unlock */
1685 walk_down:
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
This code causes a problem for flush_epd_write_bio() because | has
higher precedence than ?: so it basically turns into:
((bio)->bi_opf |= REQ_SYNC;
Which is wrong.
Fixes: ef295ecf090d ("block: better op and flags encoding")
Signed-off-by: Dan Carpenter <dan.carpen...@o
We cast 0 to a u8 but then because of type promotion, it's immediately
cast to int back to int before we do a bitwise negate. The cast doesn't
matter in this case, the code works as intended. It causes a static
checker warning though so let's remove it.
Signed-off-by: Dan Carpenter <dan.car
truct btrfs_key key;
234 int name_len;
235 int ret;
236 u64 ino;
237
238 if (!dir || !inode)
^
Old code assumed it can be NULL.
239 return -EINVAL;
240
regards,
dan carpenter
--
To unsubsc
(node->ref_mod > 0)
^
Use after free.
278 ref_tree->unique_refs += origin_count > 0 ? 0 : 1;
279 else if (node->ref_mod <= 0)
280 ref_tree->unique_refs += origin_count > 0 ? -1 : 0;
281
282 return 0;
re
The "sizeof(*arg->clone_sources) * arg->clone_sources_count" expression
can overflow. It causes several static checker warnings. It's all
under CAP_SYS_ADMIN so it's not that serious but lets silence the
warnings.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
uch a waste!" But
we could use instead use___GFP_NOFAIL instead. Or BUG_ON(!foo)". I
have gotten distracted. What was the question again?
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger
ee_lock(eb);
^^
Dereference.
1859 if (cow) {
1860 ret = btrfs_cow_block(trans, dest, eb,
parent,
1861slot, );
regards,
dan carpenter
--
To unsubs
rfs_header_level(next) !=
363 level - 1)
364 BUG();
365 btrfs_print_tree(root, next);
366 free_extent_buffer(next);
367 }
regards,
dan carpenter
--
To unsubscribe from this list: send the line &qu
leaf = path->nodes[0];
1477 btrfs_item_key_to_cpu(leaf, _key, path->slots[0]);
1478 extent = btrfs_item_ptr(leaf, path->slots[0],
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs
It's basically harmless if "ref_level" isn't initialized since it's only
used for an error message, but it causes a static checker warning.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index e42aa27..39dbdcb 10064
We were putting the NUL terminator at BTRFS_PATH_NAME_MAX (4087) bytes
instead of BTRFS_SUBVOL_NAME_MAX (4039) so it corrupted memory.
Fixes: 22af1a869288 ('btrfs: introduce device delete by devid')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/fs/btrfs/ioctl.c b/fs
}
702 re->scheduled = 1;
703 spin_unlock(>lock);
704
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
!(bctl->meta.flags & BTRFS_BALANCE_ARGS_CONVERT)) {
Same.
3076 bctl->meta.flags |= BTRFS_BALANCE_ARGS_USAGE;
3077 bctl->meta.usage = 90;
3078 }
3079 }
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
reservation(root->fs_info,
4115"space_info:enospc",
4116data_sinfo->flags, bytes,
1);
^
Potential NULL deref.
4117 r
btrfs_alloc_dummy_root() return an error pointer on failure, it never
returns NULL.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/fs/btrfs/tests/free-space-tests.c
b/fs/btrfs/tests/free-space-tests.c
index c8c3d70..8b72b00 100644
--- a/fs/btrfs/tests/free-space-t
info->balance_mutex);
4668 mutex_unlock(_info->volume_mutex);
4669 if (need_unlock)
4670
atomic_set(_info->mutually_exclusive_operation_running, 0);
4671 out:
4672 mnt_drop_write_file(file);
4673 return ret;
4674 }
regar
;
182 }
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
There is a cut and paste error so instead of freeing head_ref, we free
ref twice.
Fixes: 3368d001ba5d ('btrfs: qgroup: Record possible quota-related extent for
qgroup.')
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c
index
)) {
^^
Or here.
6625 BUG();
6626 if (!trans) {
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo
ret = -EIO;
7663 goto out;
7664 }
7665
7666 path-nodes[level] = eb;
7667 path-slots[level] = 0;
7668
regards,
dan carpenter
--
To unsubscribe from this list: send the line
The only way that ret is set is when we call scrub_pages_for_parity()
so the skip to if (ret) test doesn't make sense and causes a static
checker warning.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
Static checker work. Not tested. There are some other valid looking
warnings from
up being more complicated that way. It
makes the code simpler to re-order the unwind so it's in the mirror
order of the allocation and introduce some new error labels.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index de505d5..741b92b
are modified by the call btrfs_ioctl_snap_create_transid().
I think you are mixing up ptr and *ptr so that's why you're confused.
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo
We had intended to return a negative error code here, but we use the
wrong variable so it returns success.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/fs/btrfs/tests/btrfs-tests.c b/fs/btrfs/tests/btrfs-tests.c
index 9626252..8e7225f 100644
--- a/fs/btrfs/tests/btrfs
ret = 1;
4082 }
4083 return ret;
4084 }
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
the answer.
1099 goto
one_stack_frame_backwards;
1100 }
1101
1102 next_stack-i = -1;
regards,
dan carpenter
--
To unsubscribe from this list: send the line
) {
1204 /* FIXME: release vfsmount mnt ??*/
1205 return ERR_PTR(r);
1206 }
1207 }
1208 }
1209
Also you forgot to Sign your patch.
regards,
dan carpenter
On Mon, Apr 14, 2014 at 06:17:05PM +0200, David Sterba wrote:
On Mon, Apr 14, 2014 at 09:39:02AM -0400, Chris Mason wrote:
On 04/14/2014 09:10 AM, Dan Carpenter wrote:
Hello Harald Hoyer,
The patch 0723a0473fb4: btrfs: allow mounting btrfs subvolumes with
different ro/rw options
The error handling was copy and pasted from memdup_user(). It should be
checking for NULL obviously.
Fixes: abccd00f8af2 ('btrfs: Fix 32/64-bit problem with
BTRFS_SET_RECEIVED_SUBVOL ioctl')
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
().
299 function, line, vaf, errno, errstr);
300 va_end(args);
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo
-flags, bytes,
1);
^
Patch introduces an unchecked dereference.
3711 return -ENOSPC;
3712 }
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body
().
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
index 0525e13..0db856c 100644
--- a/fs/btrfs/raid56.c
+++ b/fs/btrfs/raid56.c
@@ -1687,11 +1687,8 @@ int raid56_parity_write(struct btrfs_root *root, struct
bio *bio,
struct
On Mon, Jul 22, 2013 at 04:47:00PM +0800, Miao Xie wrote:
On mon, 22 Jul 2013 09:55:15 +0300, Dan Carpenter wrote:
The alloc_rbio() frees raid_map and bbio on error, so there is a
potential double free bug in raid56_parity_write(). The
raid56_parity_write() and raid56_parity_recover
)
^^^
New check. Maybe we should be adding root-leafsize here? Just
the check earlier would cause a forever loop.
3815 continue;
3816 wait_on_extent_buffer_writeback(eb);
regards,
dan carpenter
The closing parenthesis is in the wrong place. We want to check
sizeof(*arg-clone_sources) * arg-clone_sources_count instead of
sizeof(*arg-clone_sources * arg-clone_sources_count).
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
This is also vulnerable to integer overflows. It's only
[ get_avail_device() sometimes returns an ERR_PTR ]
Hi Liu,
FYI, there are new smatch warnings show up in
tree: git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git
master
head: 3d294381647ab114f525a0ccf3d28f8172ce6a5f
commit: 3d294381647ab114f525a0ccf3d28f8172ce6a5f [21/21]
Hi Josef,
FYI, there are new smatch warnings show up in
tree: git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git
master
head: 39a6066ac26f336b444c666a4b7339078ebf19b1
commit: 2d6d440d12fe503bc909f9f9e1fe8771d84f [105/117] Btrfs: wait on
ordered extents at the last
This is a memory corruption bug, could someone take a look at it?
regards,
dan carpetner
On Fri, Jun 15, 2012 at 10:49:22PM +0300, Dan Carpenter wrote:
Hello Josef Bacik,
The patch 607d432da054: Btrfs: add support for multiple csum
algorithms from Dec 2, 2008, leads to the following
trans-transid is cpu endian but we want to store the data as little
endian. item-ctime.nsec is only 32 bits, not 64.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
Applies to linux-next.
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 43f0012..a1fbca0 100644
--- a/fs/btrfs
add_qgroup_rb() never returns NULL, only error pointers.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
Applies to linux-next.
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index bc424ae..b650155 100644
--- a/fs/btrfs/qgroup.c
+++ b/fs/btrfs/qgroup.c
@@ -1364,8 +1364,10 @@ int
These are returning zero when it should be returning a negative error
code.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
Applies to linux-next.
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index b650155..38b42e7 100644
--- a/fs/btrfs/qgroup.c
+++ b/fs/btrfs/qgroup.c
@@ -1371,8
it to marc.info without
getting corrupted. Marc.info strips out the From: and Subject:
headers so you'd have to add them in manually.
1) Save this file:
http://marc.info/?l=kernel-janitorsm=134062314509635q=raw
2) Edit the file and add these two lines add the top:
From: Dan Carpenter dan.carpen
We dereferenced node in the error message after freeing it. Also
btrfs_panic() can return so we should return an error code instead of
continuing.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
v2: in the first version I just deleted the kfree().
diff --git a/fs/btrfs/relocation.c b
On Mon, Jun 25, 2012 at 09:41:12AM -0400, Josef Bacik wrote:
On Mon, Jun 25, 2012 at 05:15:23AM -0600, Dan Carpenter wrote:
We dereferenced node in the error message after freeing it. Also
btrfs_panic() can return so we should return an error code instead of
continuing.
Signed-off
.
1285 }
1286 return 0;
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
We free node and then dereference it in the panic message on the next
line. I considered moving the kfree() after the panic given that panic
can return under certain configurations, but in the end I decided it
doesn't matter if we leak a bit after a panic.
Signed-off-by: Dan Carpenter dan.carpen
On Fri, Jun 22, 2012 at 09:09:04AM -0400, Josef Bacik wrote:
On 06/22/2012 03:14 AM, Dan Carpenter wrote:
We free node and then dereference it in the panic message on the next
line. I considered moving the kfree() after the panic given that panic
can return under certain configurations
root-fs_info and fs_info are the same, but fs_info is prefered
because it is shorter and that's what is used in the rest of the
function.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
Also, Smatch doesn't understand that they are the same so it complains
about the locking.
diff --git
it. Sorry, if I've misread something.
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
if (result != (char *)inline_result)
308 kfree(result);
309 return 1;
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
generation = btrfs_header_generation(eb);
^^^
Dereferenced inside function without checking.
148 /*
149 * FIXME: currently we just set nritems to 0 if this is
a leaf,
regards,
dan carpenter
.
This code changes significantly with the patch
btrfs: extend readahead interface
Where it is written in a more obvious way.
Cool.
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info
, 1);
+ if (ret == 1)
+ kref_get(zone-refcnt);
}
+ spin_unlock(fs_info-reada_lock);
return zone;
}
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord
On Mon, Apr 30, 2012 at 01:23:29PM +0200, Arne Jansen wrote:
On 30.04.2012 13:11, Dan Carpenter wrote:
Hello Arne Jansen,
The patch 8c9c2bf7a3c4: btrfs: fix race in reada from Feb 25, 2012,
leads to the following warning:
fs/btrfs/reada.c:308 reada_find_zone()
warn: 'zone
On Mon, Apr 30, 2012 at 01:23:29PM +0200, Arne Jansen wrote:
On 30.04.2012 13:11, Dan Carpenter wrote:
Hello Arne Jansen,
The patch 8c9c2bf7a3c4: btrfs: fix race in reada from Feb 25, 2012,
leads to the following warning:
fs/btrfs/reada.c:308 reada_find_zone()
warn: 'zone
The caller expects this function to return with the lock held and
releases it immediately on error.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 2b35f8d..a0bb9dc 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent
It confuses Smatch that we use two names for the same lock. Plus the
shorter name is nicer. This doesn't change how the code works, it's
just a cleanup.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index a0bb9dc..29c0445
On Wed, Apr 18, 2012 at 01:29:46PM +0200, Jan Schmidt wrote:
On 18.04.2012 08:59, Dan Carpenter wrote:
I think the correct way to fix this is:
Yeah. I considered both ways, but I chose the one which makes the
tools happy. Which is the wrong choice, because taking a pointless
lock is wrong
-fs_info-reloc_mutex); before these
two gotos?
1414 }
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Apr 02, 2012 at 12:46:44PM +0200, David Sterba wrote:
Thanks for cathing it. Are you going to send a patch or are you fine
with a Reported-by: ?
You're welcome. :) Reported-by is fine.
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe linux
On Wed, Feb 22, 2012 at 08:29:26AM -0800, David Brown wrote:
On Wed, Feb 22, 2012 at 10:30:55AM +0300, Dan Carpenter wrote:
Gcc warns that ret can be used uninitialized. It can't actually be
used uninitialized because btrfs_num_copies() always returns 1 or more.
Signed-off-by: Dan Carpenter
Gcc warns that ret can be used uninitialized. It can't actually be
used uninitialized because btrfs_num_copies() always returns 1 or more.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
v2: use the uninitialized_var() macro instead of initializing to 0.
diff --git a/fs/btrfs/check
Gcc warns that ret can be used uninitialized. It can't actually be
used uninitialized because btrfs_num_copies() always returns 1 or more.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c
index 064b29b..c053e90 100644
be either a negative error code, zero, or one here.
921
I looked at the code, but couldn't tell if it was intentional or not.
It really is pretty unusual to do that, so maybe there should be a
comment or something.
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe
The intent here was to do a logical instead of a bitwise . The
original condition tests whether they have the some of same bits set.
I have fixed that and rewritten it to be more clear.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
Warning: This is a static analysis bug and I'm
These should be gfp_t or Sparse complains:
fs/btrfs/ulist.c:100:55: warning:
incorrect type in argument 2 (different base types)
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/fs/btrfs/ulist.c b/fs/btrfs/ulist.c
index 12f5147..5d1b047 100644
--- a/fs/btrfs/ulist.c
() instead of spin_lock_irq().
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
init_ipath() can return an ERR_PTR(-ENOMEM).
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index ed11d38..b72ee47 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -256,6 +256,11 @@ static int scrub_print_warning_inode(u64 inum, u64
here.
If we don't hit the break statement, then at the end of the loop we'd
oops.
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
We don't use the defrag struct on this path.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 658d669..1102059 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -150,6 +150,8 @@ int btrfs_add_inode_defrag(struct btrfs_trans_handle *trans
There were some unlocks on error missing in a recent patch to
btrfs_file_llseek().
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 59cbdb1..94d8342 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -1804,10 +1804,14 @@ static loff_t
The break was in front of the nr = i assignment so that was never hit.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 0d1d966..ceb8ad2 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -3453,8 +3453,8 @@ int btrfs_insert_some_items
? That introduces a dereference at the start of the
function.
Sorry about this. I didn't take back porting into consideration.
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at http
sure
you have a recent enough kernel.
This actually was merged into the btrfs and the kernel.org trees
already.
I'm not sure how the btrfs backports work...
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord
please look it over carefully.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index fa6ccc1..9640dae 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2673,7 +2673,7 @@ static int check_path_shared(struct btrfs_root *root,
struct
On Sat, May 29, 2010 at 11:01:56AM -0700, Mike Fedyk wrote:
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
On Mon, May 31, 2010 at 04:58:47PM +0800, Yan, Zheng wrote:
Fix a potential null dereference in relocation.c
Thanks for that.
Acked-by: Dan Carpenter erro...@gmail.com
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message
);
^^
if tree_search() returns NULL it will oops here.
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
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
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
1 - 100 of 116 matches
Mail list logo