* [PATCH] btrfs: check return value of btrfs_start_ioctl_transaction() properly
@ 2011-01-24 0:57 Tsutomu Itoh
0 siblings, 0 replies; only message in thread
From: Tsutomu Itoh @ 2011-01-24 0:57 UTC (permalink / raw)
To: Linux Btrfs; +Cc: Chris Mason
btrfs_start_ioctl_transaction() returns ERR_PTR(), not NULL.
So, it is necessary to use IS_ERR() to check the return value.
Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
---
fs/btrfs/ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -urNp linux-2.6.38-rc1/fs/btrfs/ioctl.c linux-2.6.38-rc1.new/fs/btrfs/ioctl.c
--- linux-2.6.38-rc1/fs/btrfs/ioctl.c 2011-01-19 08:14:02.000000000 +0900
+++ linux-2.6.38-rc1.new/fs/btrfs/ioctl.c 2011-01-24 09:27:12.000000000 +0900
@@ -2082,7 +2082,7 @@ static long btrfs_ioctl_trans_start(stru
ret = -ENOMEM;
trans = btrfs_start_ioctl_transaction(root, 0);
- if (!trans)
+ if (IS_ERR(trans))
goto out_drop;
file->private_data = trans;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-01-24 0:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-24 0:57 [PATCH] btrfs: check return value of btrfs_start_ioctl_transaction() properly Tsutomu Itoh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.