struct inode *inode;
int error;
-@@ -670,9 +683,16 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
+@@ -670,13 +683,20 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
file = fget(arg);
if (!file)
goto out;
+ get_file(file);
+ }
+ error = loop_validate_file(file, bdev);
+ if (error)
+ goto out_putf;
+
inode = file->f_mapping->host;
old_file = lo->lo_backing_file;
+ old_virt_file = lo->lo_backing_virt_file;
static int loop_set_fd(struct loop_device *lo, fmode_t mode,
struct block_device *bdev, unsigned int arg)
{
-- struct file *file, *f;
+- struct file *file;
+ struct file *file, *f, *virt_file = NULL;
struct inode *inode;
struct address_space *mapping;
%define rel 1
%define basever 4.4
-%define postver .140
+%define postver .143
# define this to '-%{basever}' for longterm branch
%define versuffix -%{basever}
# Source0-md5: 9a78fa2eb6c68ca5a40ed5af08142599
%if "%{postver}" != ".0"
Patch0: http://www.kernel.org/pub/linux/kernel/v4.x/patch-%{version}.xz
-# Patch0-md5: 5714c26e071c171bc1f29be9892d6f3b
+# Patch0-md5: f0f3159f75e5775e8939974b99566340
%endif
Source1: kernel.sysconfig