summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2021-01-31 19:23:55 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2021-02-23 10:25:29 -0500
commit6f24784f00f2b5862b367caeecc5cca22a77faa3 (patch)
treebcbdc0d7f18f5036f360bb61cc0c9447a25f348c /drivers/block
parent9652c73246b980b9f2387916c35e02638d163472 (diff)
whack-a-mole: don't open-code iminor/imajor
several instances creeped back into the tree... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/loop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index e5ff328f0917..b51330017ce1 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -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)