diff options
author | Christoph Hellwig | 2020-09-21 09:19:55 +0200 |
---|---|---|
committer | Jens Axboe | 2020-09-23 10:43:19 -0600 |
commit | bb3247a399801ebba20bef101c89e563f5fe7f02 (patch) | |
tree | fc29d5715b43fe2e7dd1b72c36c5a4bf802d630e /fs/block_dev.c | |
parent | ef16e1d98c4e05338ab9c381ac0100a4ed0626ca (diff) |
PM: rewrite is_hibernate_resume_dev to not require an inode
Just check the dev_t to help simplifying the code.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r-- | fs/block_dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index 1a9325f43157..2898d69be6b3 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -1885,7 +1885,7 @@ ssize_t blkdev_write_iter(struct kiocb *iocb, struct iov_iter *from) if (bdev_read_only(I_BDEV(bd_inode))) return -EPERM; - if (IS_SWAPFILE(bd_inode) && !is_hibernate_resume_dev(bd_inode)) + if (IS_SWAPFILE(bd_inode) && !is_hibernate_resume_dev(bd_inode->i_rdev)) return -ETXTBSY; if (!iov_iter_count(from)) |