Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4de665c1 authored by Bob Glossman's avatar Bob Glossman Committed by Greg Kroah-Hartman
Browse files

staging/lustre/lloop: avoid panic during blockdev_info



Change the LL_IOC_LLOOP_INFO ioctl in the lustre lloop
device driver to return an error instead of causing
panics with LASSERT().

Signed-off-by: default avatarBob Glossman <bob.glossman@intel.com>
Reviewed-on: http://review.whamcloud.com/9888
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4863


Reviewed-by: default avatarNathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 73b89907
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -624,7 +624,10 @@ static int lo_ioctl(struct block_device *bdev, fmode_t mode,
	case LL_IOC_LLOOP_INFO: {
		struct lu_fid fid;

		LASSERT(lo->lo_backing_file != NULL);
		if (lo->lo_backing_file == NULL) {
			err = -ENOENT;
			break;
		}
		if (inode == NULL)
			inode = lo->lo_backing_file->f_dentry->d_inode;
		if (lo->lo_state == LLOOP_BOUND)