Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[linux-block.git] / drivers / block / loop.c
index 578fc034db3f483c9224e222f35fb4c4a341e2a6..a06b99473ca063f3585a2761776348550f4208c3 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)