提交 ecc7ada7 编写于 作者: T Tsutomu Itoh 提交者: Josef Bacik

Btrfs: fix error handling in btrfs_ioctl_send()

fget() returns NULL if error. So, we should check NULL or not.
Signed-off-by: NTsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
上级 ba1eeaac
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册