projects
/
profile
/
ivi
/
kernel-x86-ivi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba1eeaa
)
Btrfs: fix error handling in btrfs_ioctl_send()
author
Tsutomu Itoh
<t-itoh@jp.fujitsu.com>
Fri, 19 Apr 2013 01:04:46 +0000
(
01:04
+0000)
committer
Josef Bacik
<jbacik@fusionio.com>
Mon, 6 May 2013 19:55:13 +0000
(15:55 -0400)
fget() returns NULL if error. So, we should check NULL or not.
Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/send.c
patch
|
blob
|
history
diff --git
a/fs/btrfs/send.c
b/fs/btrfs/send.c
index 158b91984b600099cd1938649393ef0a969c2db2..2037fc0efab168235c3a4b596d1e6ec1e8eacb59 100644
(file)
--- a/
fs/btrfs/send.c
+++ b/
fs/btrfs/send.c
@@
-4612,8
+4612,8
@@
long btrfs_ioctl_send(struct file *mnt_file, void __user *arg_)
sctx->flags = arg->flags;
sctx->send_filp = fget(arg->send_fd);
- if (
IS_ERR(sctx->send_filp)
) {
- ret =
PTR_ERR(sctx->send_filp)
;
+ if (
!sctx->send_filp
) {
+ ret =
-EBADF
;
goto out;
}