mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 06:34:12 +08:00
f2fs: make f2fs_write_failed() take struct inode
Make f2fs_write_failed() take a 'struct inode' directly rather than a 'struct address_space', as this simplifies it slightly. Signed-off-by: Eric Biggers <ebiggers@google.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
9de71ede81
commit
3e679dc78c
@ -3178,9 +3178,8 @@ static int f2fs_write_data_pages(struct address_space *mapping,
|
||||
FS_CP_DATA_IO : FS_DATA_IO);
|
||||
}
|
||||
|
||||
static void f2fs_write_failed(struct address_space *mapping, loff_t to)
|
||||
static void f2fs_write_failed(struct inode *inode, loff_t to)
|
||||
{
|
||||
struct inode *inode = mapping->host;
|
||||
loff_t i_size = i_size_read(inode);
|
||||
|
||||
if (IS_NOQUOTA(inode))
|
||||
@ -3412,7 +3411,7 @@ repeat:
|
||||
|
||||
fail:
|
||||
f2fs_put_page(page, 1);
|
||||
f2fs_write_failed(mapping, pos + len);
|
||||
f2fs_write_failed(inode, pos + len);
|
||||
if (drop_atomic)
|
||||
f2fs_drop_inmem_pages_all(sbi, false);
|
||||
return err;
|
||||
@ -3602,7 +3601,7 @@ static ssize_t f2fs_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
|
||||
f2fs_update_iostat(F2FS_I_SB(inode), APP_DIRECT_IO,
|
||||
count - iov_iter_count(iter));
|
||||
} else if (err < 0) {
|
||||
f2fs_write_failed(mapping, offset + count);
|
||||
f2fs_write_failed(inode, offset + count);
|
||||
}
|
||||
} else {
|
||||
if (err > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user