Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[platform/kernel/linux-starfive.git] / drivers / block / loop.c
index 578fc03..a06b994 100644 (file)
@@ -663,7 +663,7 @@ static inline int is_loop_device(struct file *file)
 {
        struct inode *i = file->f_mapping->host;
 
-       return i && S_ISBLK(i->i_mode) && MAJOR(i->i_rdev) == LOOP_MAJOR;
+       return i && S_ISBLK(i->i_mode) && imajor(i) == LOOP_MAJOR;
 }
 
 static int loop_validate_file(struct file *file, struct block_device *bdev)