diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2021-01-31 19:23:55 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2021-02-23 10:25:29 -0500 |
commit | 6f24784f00f2b5862b367caeecc5cca22a77faa3 (patch) | |
tree | bcbdc0d7f18f5036f360bb61cc0c9447a25f348c /drivers/block/loop.c | |
parent | 9652c73246b980b9f2387916c35e02638d163472 (diff) | |
download | linux-6f24784f00f2b5862b367caeecc5cca22a77faa3.tar.gz linux-6f24784f00f2b5862b367caeecc5cca22a77faa3.tar.bz2 linux-6f24784f00f2b5862b367caeecc5cca22a77faa3.zip |
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/loop.c')
-rw-r--r-- | drivers/block/loop.c | 2 |
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) |