mirror of
https://github.com/torvalds/linux.git
synced 2024-12-24 11:51:27 +00:00
fs: Remove flags parameter from aops->write_begin
There are no more aop flags left, so remove the parameter. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
8371f30cf7
commit
9d6b0cd757
@ -242,7 +242,7 @@ prototypes::
|
|||||||
bool (*dirty_folio)(struct address_space *, struct folio *folio);
|
bool (*dirty_folio)(struct address_space *, struct folio *folio);
|
||||||
void (*readahead)(struct readahead_control *);
|
void (*readahead)(struct readahead_control *);
|
||||||
int (*write_begin)(struct file *, struct address_space *mapping,
|
int (*write_begin)(struct file *, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata);
|
struct page **pagep, void **fsdata);
|
||||||
int (*write_end)(struct file *, struct address_space *mapping,
|
int (*write_end)(struct file *, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned copied,
|
loff_t pos, unsigned len, unsigned copied,
|
||||||
|
@ -727,7 +727,7 @@ cache in your filesystem. The following members are defined:
|
|||||||
bool (*dirty_folio)(struct address_space *, struct folio *);
|
bool (*dirty_folio)(struct address_space *, struct folio *);
|
||||||
void (*readahead)(struct readahead_control *);
|
void (*readahead)(struct readahead_control *);
|
||||||
int (*write_begin)(struct file *, struct address_space *mapping,
|
int (*write_begin)(struct file *, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata);
|
struct page **pagep, void **fsdata);
|
||||||
int (*write_end)(struct file *, struct address_space *mapping,
|
int (*write_end)(struct file *, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned copied,
|
loff_t pos, unsigned len, unsigned copied,
|
||||||
@ -832,9 +832,6 @@ cache in your filesystem. The following members are defined:
|
|||||||
passed to write_begin is greater than the number of bytes copied
|
passed to write_begin is greater than the number of bytes copied
|
||||||
into the page).
|
into the page).
|
||||||
|
|
||||||
flags is a field for AOP_FLAG_xxx flags, described in
|
|
||||||
include/linux/fs.h.
|
|
||||||
|
|
||||||
A void * may be returned in fsdata, which then gets passed into
|
A void * may be returned in fsdata, which then gets passed into
|
||||||
write_end.
|
write_end.
|
||||||
|
|
||||||
|
@ -398,8 +398,7 @@ static void blkdev_readahead(struct readahead_control *rac)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int blkdev_write_begin(struct file *file, struct address_space *mapping,
|
static int blkdev_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags, struct page **pagep,
|
loff_t pos, unsigned len, struct page **pagep, void **fsdata)
|
||||||
void **fsdata)
|
|
||||||
{
|
{
|
||||||
return block_write_begin(mapping, pos, len, pagep, blkdev_get_block);
|
return block_write_begin(mapping, pos, len, pagep, blkdev_get_block);
|
||||||
}
|
}
|
||||||
|
@ -260,7 +260,7 @@ v9fs_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int v9fs_write_begin(struct file *filp, struct address_space *mapping,
|
static int v9fs_write_begin(struct file *filp, struct address_space *mapping,
|
||||||
loff_t pos, unsigned int len, unsigned int flags,
|
loff_t pos, unsigned int len,
|
||||||
struct page **subpagep, void **fsdata)
|
struct page **subpagep, void **fsdata)
|
||||||
{
|
{
|
||||||
int retval;
|
int retval;
|
||||||
|
@ -52,7 +52,7 @@ static void adfs_write_failed(struct address_space *mapping, loff_t to)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int adfs_write_begin(struct file *file, struct address_space *mapping,
|
static int adfs_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -414,7 +414,7 @@ affs_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int affs_write_begin(struct file *file, struct address_space *mapping,
|
static int affs_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@ -650,7 +650,7 @@ affs_readpage_ofs(struct file *file, struct page *page)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int affs_write_begin_ofs(struct file *file, struct address_space *mapping,
|
static int affs_write_begin_ofs(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
struct inode *inode = mapping->host;
|
struct inode *inode = mapping->host;
|
||||||
@ -887,7 +887,7 @@ affs_truncate(struct inode *inode)
|
|||||||
loff_t isize = inode->i_size;
|
loff_t isize = inode->i_size;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
res = mapping->a_ops->write_begin(NULL, mapping, isize, 0, 0, &page, &fsdata);
|
res = mapping->a_ops->write_begin(NULL, mapping, isize, 0, &page, &fsdata);
|
||||||
if (!res)
|
if (!res)
|
||||||
res = mapping->a_ops->write_end(NULL, mapping, isize, 0, 0, page, fsdata);
|
res = mapping->a_ops->write_end(NULL, mapping, isize, 0, 0, page, fsdata);
|
||||||
else
|
else
|
||||||
|
@ -1535,7 +1535,7 @@ bool afs_dirty_folio(struct address_space *, struct folio *);
|
|||||||
#define afs_dirty_folio filemap_dirty_folio
|
#define afs_dirty_folio filemap_dirty_folio
|
||||||
#endif
|
#endif
|
||||||
extern int afs_write_begin(struct file *file, struct address_space *mapping,
|
extern int afs_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata);
|
struct page **pagep, void **fsdata);
|
||||||
extern int afs_write_end(struct file *file, struct address_space *mapping,
|
extern int afs_write_end(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned copied,
|
loff_t pos, unsigned len, unsigned copied,
|
||||||
|
@ -42,7 +42,7 @@ static void afs_folio_start_fscache(bool caching, struct folio *folio)
|
|||||||
* prepare to perform part of a write to a page
|
* prepare to perform part of a write to a page
|
||||||
*/
|
*/
|
||||||
int afs_write_begin(struct file *file, struct address_space *mapping,
|
int afs_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **_page, void **fsdata)
|
struct page **_page, void **fsdata)
|
||||||
{
|
{
|
||||||
struct afs_vnode *vnode = AFS_FS_I(file_inode(file));
|
struct afs_vnode *vnode = AFS_FS_I(file_inode(file));
|
||||||
|
@ -169,7 +169,7 @@ static void bfs_write_failed(struct address_space *mapping, loff_t to)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int bfs_write_begin(struct file *file, struct address_space *mapping,
|
static int bfs_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -1311,7 +1311,7 @@ static int ceph_netfs_check_write_begin(struct file *file, loff_t pos, unsigned
|
|||||||
* clean, or already dirty within the same snap context.
|
* clean, or already dirty within the same snap context.
|
||||||
*/
|
*/
|
||||||
static int ceph_write_begin(struct file *file, struct address_space *mapping,
|
static int ceph_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned aop_flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
struct inode *inode = file_inode(file);
|
struct inode *inode = file_inode(file);
|
||||||
|
@ -4681,7 +4681,7 @@ bool is_size_safe_to_change(struct cifsInodeInfo *cifsInode, __u64 end_of_file)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int cifs_write_begin(struct file *file, struct address_space *mapping,
|
static int cifs_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
int oncethru = 0;
|
int oncethru = 0;
|
||||||
|
@ -264,7 +264,7 @@ out:
|
|||||||
*/
|
*/
|
||||||
static int ecryptfs_write_begin(struct file *file,
|
static int ecryptfs_write_begin(struct file *file,
|
||||||
struct address_space *mapping,
|
struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
pgoff_t index = pos >> PAGE_SHIFT;
|
pgoff_t index = pos >> PAGE_SHIFT;
|
||||||
|
@ -389,7 +389,7 @@ static void exfat_write_failed(struct address_space *mapping, loff_t to)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int exfat_write_begin(struct file *file, struct address_space *mapping,
|
static int exfat_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned int len, unsigned int flags,
|
loff_t pos, unsigned int len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -887,8 +887,7 @@ static void ext2_readahead(struct readahead_control *rac)
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
ext2_write_begin(struct file *file, struct address_space *mapping,
|
ext2_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len, struct page **pagep, void **fsdata)
|
||||||
struct page **pagep, void **fsdata)
|
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -912,8 +911,7 @@ static int ext2_write_end(struct file *file, struct address_space *mapping,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
ext2_nobh_write_begin(struct file *file, struct address_space *mapping,
|
ext2_nobh_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len, struct page **pagep, void **fsdata)
|
||||||
struct page **pagep, void **fsdata)
|
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
@ -1130,7 +1130,7 @@ static int ext4_block_write_begin(struct page *page, loff_t pos, unsigned len,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int ext4_write_begin(struct file *file, struct address_space *mapping,
|
static int ext4_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
struct inode *inode = mapping->host;
|
struct inode *inode = mapping->host;
|
||||||
@ -1144,7 +1144,7 @@ static int ext4_write_begin(struct file *file, struct address_space *mapping,
|
|||||||
if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb))))
|
if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb))))
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
trace_ext4_write_begin(inode, pos, len, flags);
|
trace_ext4_write_begin(inode, pos, len);
|
||||||
/*
|
/*
|
||||||
* Reserve one block more for addition to orphan list in case
|
* Reserve one block more for addition to orphan list in case
|
||||||
* we allocate blocks but write fails for some reason
|
* we allocate blocks but write fails for some reason
|
||||||
@ -2931,7 +2931,7 @@ static int ext4_nonda_switch(struct super_block *sb)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int ext4_da_write_begin(struct file *file, struct address_space *mapping,
|
static int ext4_da_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
int ret, retries = 0;
|
int ret, retries = 0;
|
||||||
@ -2948,10 +2948,10 @@ static int ext4_da_write_begin(struct file *file, struct address_space *mapping,
|
|||||||
ext4_verity_in_progress(inode)) {
|
ext4_verity_in_progress(inode)) {
|
||||||
*fsdata = (void *)FALL_BACK_TO_NONDELALLOC;
|
*fsdata = (void *)FALL_BACK_TO_NONDELALLOC;
|
||||||
return ext4_write_begin(file, mapping, pos,
|
return ext4_write_begin(file, mapping, pos,
|
||||||
len, flags, pagep, fsdata);
|
len, pagep, fsdata);
|
||||||
}
|
}
|
||||||
*fsdata = (void *)0;
|
*fsdata = (void *)0;
|
||||||
trace_ext4_da_write_begin(inode, pos, len, flags);
|
trace_ext4_da_write_begin(inode, pos, len);
|
||||||
|
|
||||||
if (ext4_test_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA)) {
|
if (ext4_test_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA)) {
|
||||||
ret = ext4_da_write_inline_data_begin(mapping, inode, pos, len,
|
ret = ext4_da_write_inline_data_begin(mapping, inode, pos, len,
|
||||||
|
@ -3314,8 +3314,7 @@ unlock_out:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int f2fs_write_begin(struct file *file, struct address_space *mapping,
|
static int f2fs_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len, struct page **pagep, void **fsdata)
|
||||||
struct page **pagep, void **fsdata)
|
|
||||||
{
|
{
|
||||||
struct inode *inode = mapping->host;
|
struct inode *inode = mapping->host;
|
||||||
struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
|
struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
|
||||||
@ -3325,7 +3324,7 @@ static int f2fs_write_begin(struct file *file, struct address_space *mapping,
|
|||||||
block_t blkaddr = NULL_ADDR;
|
block_t blkaddr = NULL_ADDR;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
trace_f2fs_write_begin(inode, pos, len, flags);
|
trace_f2fs_write_begin(inode, pos, len);
|
||||||
|
|
||||||
if (!f2fs_is_checkpoint_ready(sbi)) {
|
if (!f2fs_is_checkpoint_ready(sbi)) {
|
||||||
err = -ENOSPC;
|
err = -ENOSPC;
|
||||||
|
@ -2483,7 +2483,7 @@ static ssize_t f2fs_quota_write(struct super_block *sb, int type,
|
|||||||
tocopy = min_t(unsigned long, sb->s_blocksize - offset,
|
tocopy = min_t(unsigned long, sb->s_blocksize - offset,
|
||||||
towrite);
|
towrite);
|
||||||
retry:
|
retry:
|
||||||
err = a_ops->write_begin(NULL, mapping, off, tocopy, 0,
|
err = a_ops->write_begin(NULL, mapping, off, tocopy,
|
||||||
&page, &fsdata);
|
&page, &fsdata);
|
||||||
if (unlikely(err)) {
|
if (unlikely(err)) {
|
||||||
if (err == -ENOMEM) {
|
if (err == -ENOMEM) {
|
||||||
|
@ -226,7 +226,7 @@ static void fat_write_failed(struct address_space *mapping, loff_t to)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int fat_write_begin(struct file *file, struct address_space *mapping,
|
static int fat_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
@ -2273,8 +2273,7 @@ out:
|
|||||||
* but how to implement it without killing performance need more thinking.
|
* but how to implement it without killing performance need more thinking.
|
||||||
*/
|
*/
|
||||||
static int fuse_write_begin(struct file *file, struct address_space *mapping,
|
static int fuse_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len, struct page **pagep, void **fsdata)
|
||||||
struct page **pagep, void **fsdata)
|
|
||||||
{
|
{
|
||||||
pgoff_t index = pos >> PAGE_SHIFT;
|
pgoff_t index = pos >> PAGE_SHIFT;
|
||||||
struct fuse_conn *fc = get_fuse_conn(file_inode(file));
|
struct fuse_conn *fc = get_fuse_conn(file_inode(file));
|
||||||
|
@ -50,7 +50,7 @@ static void hfs_write_failed(struct address_space *mapping, loff_t to)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int hfs_write_begin(struct file *file, struct address_space *mapping,
|
static int hfs_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -44,7 +44,7 @@ static void hfsplus_write_failed(struct address_space *mapping, loff_t to)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int hfsplus_write_begin(struct file *file, struct address_space *mapping,
|
static int hfsplus_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -463,7 +463,7 @@ static int hostfs_readpage(struct file *file, struct page *page)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int hostfs_write_begin(struct file *file, struct address_space *mapping,
|
static int hostfs_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
pgoff_t index = pos >> PAGE_SHIFT;
|
pgoff_t index = pos >> PAGE_SHIFT;
|
||||||
|
@ -194,7 +194,7 @@ static void hpfs_write_failed(struct address_space *mapping, loff_t to)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int hpfs_write_begin(struct file *file, struct address_space *mapping,
|
static int hpfs_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -383,7 +383,7 @@ static ssize_t hugetlbfs_read_iter(struct kiocb *iocb, struct iov_iter *to)
|
|||||||
|
|
||||||
static int hugetlbfs_write_begin(struct file *file,
|
static int hugetlbfs_write_begin(struct file *file,
|
||||||
struct address_space *mapping,
|
struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -25,7 +25,7 @@ static int jffs2_write_end(struct file *filp, struct address_space *mapping,
|
|||||||
loff_t pos, unsigned len, unsigned copied,
|
loff_t pos, unsigned len, unsigned copied,
|
||||||
struct page *pg, void *fsdata);
|
struct page *pg, void *fsdata);
|
||||||
static int jffs2_write_begin(struct file *filp, struct address_space *mapping,
|
static int jffs2_write_begin(struct file *filp, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata);
|
struct page **pagep, void **fsdata);
|
||||||
static int jffs2_readpage (struct file *filp, struct page *pg);
|
static int jffs2_readpage (struct file *filp, struct page *pg);
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ static int jffs2_readpage (struct file *filp, struct page *pg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int jffs2_write_begin(struct file *filp, struct address_space *mapping,
|
static int jffs2_write_begin(struct file *filp, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
struct page *pg;
|
struct page *pg;
|
||||||
|
@ -314,7 +314,7 @@ static void jfs_write_failed(struct address_space *mapping, loff_t to)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int jfs_write_begin(struct file *file, struct address_space *mapping,
|
static int jfs_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -549,7 +549,7 @@ static int simple_readpage(struct file *file, struct page *page)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int simple_write_begin(struct file *file, struct address_space *mapping,
|
int simple_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
struct page *page;
|
struct page *page;
|
||||||
|
@ -423,7 +423,7 @@ static void minix_write_failed(struct address_space *mapping, loff_t to)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int minix_write_begin(struct file *file, struct address_space *mapping,
|
static int minix_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -313,7 +313,7 @@ static bool nfs_want_read_modify_write(struct file *file, struct page *page,
|
|||||||
* increment the page use counts until he is done with the page.
|
* increment the page use counts until he is done with the page.
|
||||||
*/
|
*/
|
||||||
static int nfs_write_begin(struct file *file, struct address_space *mapping,
|
static int nfs_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -248,7 +248,7 @@ void nilfs_write_failed(struct address_space *mapping, loff_t to)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int nilfs_write_begin(struct file *file, struct address_space *mapping,
|
static int nilfs_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -862,7 +862,7 @@ static int ntfs_get_block_write_begin(struct inode *inode, sector_t vbn,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int ntfs_write_begin(struct file *file, struct address_space *mapping,
|
static int ntfs_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, u32 len, u32 flags, struct page **pagep,
|
loff_t pos, u32 len, struct page **pagep,
|
||||||
void **fsdata)
|
void **fsdata)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
@ -1881,7 +1881,7 @@ out:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int ocfs2_write_begin(struct file *file, struct address_space *mapping,
|
static int ocfs2_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -316,7 +316,7 @@ static void omfs_write_failed(struct address_space *mapping, loff_t to)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int omfs_write_begin(struct file *file, struct address_space *mapping,
|
static int omfs_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -326,9 +326,8 @@ static int orangefs_readpage(struct file *file, struct page *page)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int orangefs_write_begin(struct file *file,
|
static int orangefs_write_begin(struct file *file,
|
||||||
struct address_space *mapping,
|
struct address_space *mapping, loff_t pos, unsigned len,
|
||||||
loff_t pos, unsigned len, unsigned flags, struct page **pagep,
|
struct page **pagep, void **fsdata)
|
||||||
void **fsdata)
|
|
||||||
{
|
{
|
||||||
struct orangefs_write_range *wr;
|
struct orangefs_write_range *wr;
|
||||||
struct folio *folio;
|
struct folio *folio;
|
||||||
|
@ -2753,7 +2753,7 @@ static void reiserfs_truncate_failed_write(struct inode *inode)
|
|||||||
|
|
||||||
static int reiserfs_write_begin(struct file *file,
|
static int reiserfs_write_begin(struct file *file,
|
||||||
struct address_space *mapping,
|
struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
struct inode *inode;
|
struct inode *inode;
|
||||||
|
@ -477,7 +477,7 @@ static void sysv_write_failed(struct address_space *mapping, loff_t to)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int sysv_write_begin(struct file *file, struct address_space *mapping,
|
static int sysv_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -215,8 +215,7 @@ static void release_existing_page_budget(struct ubifs_info *c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int write_begin_slow(struct address_space *mapping,
|
static int write_begin_slow(struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, struct page **pagep,
|
loff_t pos, unsigned len, struct page **pagep)
|
||||||
unsigned flags)
|
|
||||||
{
|
{
|
||||||
struct inode *inode = mapping->host;
|
struct inode *inode = mapping->host;
|
||||||
struct ubifs_info *c = inode->i_sb->s_fs_info;
|
struct ubifs_info *c = inode->i_sb->s_fs_info;
|
||||||
@ -419,7 +418,7 @@ static int allocate_budget(struct ubifs_info *c, struct page *page,
|
|||||||
* without forcing write-back. The slow path does not make this assumption.
|
* without forcing write-back. The slow path does not make this assumption.
|
||||||
*/
|
*/
|
||||||
static int ubifs_write_begin(struct file *file, struct address_space *mapping,
|
static int ubifs_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
struct inode *inode = mapping->host;
|
struct inode *inode = mapping->host;
|
||||||
@ -493,7 +492,7 @@ static int ubifs_write_begin(struct file *file, struct address_space *mapping,
|
|||||||
unlock_page(page);
|
unlock_page(page);
|
||||||
put_page(page);
|
put_page(page);
|
||||||
|
|
||||||
return write_begin_slow(mapping, pos, len, pagep, flags);
|
return write_begin_slow(mapping, pos, len, pagep);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -87,7 +87,7 @@ static int udf_adinicb_writepage(struct page *page,
|
|||||||
|
|
||||||
static int udf_adinicb_write_begin(struct file *file,
|
static int udf_adinicb_write_begin(struct file *file,
|
||||||
struct address_space *mapping, loff_t pos,
|
struct address_space *mapping, loff_t pos,
|
||||||
unsigned len, unsigned flags, struct page **pagep,
|
unsigned len, struct page **pagep,
|
||||||
void **fsdata)
|
void **fsdata)
|
||||||
{
|
{
|
||||||
struct page *page;
|
struct page *page;
|
||||||
|
@ -204,7 +204,7 @@ static void udf_readahead(struct readahead_control *rac)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int udf_write_begin(struct file *file, struct address_space *mapping,
|
static int udf_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -495,7 +495,7 @@ static void ufs_write_failed(struct address_space *mapping, loff_t to)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int ufs_write_begin(struct file *file, struct address_space *mapping,
|
static int ufs_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -346,7 +346,7 @@ struct address_space_operations {
|
|||||||
void (*readahead)(struct readahead_control *);
|
void (*readahead)(struct readahead_control *);
|
||||||
|
|
||||||
int (*write_begin)(struct file *, struct address_space *mapping,
|
int (*write_begin)(struct file *, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata);
|
struct page **pagep, void **fsdata);
|
||||||
int (*write_end)(struct file *, struct address_space *mapping,
|
int (*write_end)(struct file *, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned copied,
|
loff_t pos, unsigned len, unsigned copied,
|
||||||
@ -3179,7 +3179,7 @@ extern int noop_fsync(struct file *, loff_t, loff_t, int);
|
|||||||
extern ssize_t noop_direct_IO(struct kiocb *iocb, struct iov_iter *iter);
|
extern ssize_t noop_direct_IO(struct kiocb *iocb, struct iov_iter *iter);
|
||||||
extern int simple_empty(struct dentry *);
|
extern int simple_empty(struct dentry *);
|
||||||
extern int simple_write_begin(struct file *file, struct address_space *mapping,
|
extern int simple_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata);
|
struct page **pagep, void **fsdata);
|
||||||
extern const struct address_space_operations ram_aops;
|
extern const struct address_space_operations ram_aops;
|
||||||
extern int always_delete_dentry(const struct dentry *);
|
extern int always_delete_dentry(const struct dentry *);
|
||||||
|
@ -335,17 +335,15 @@ TRACE_EVENT(ext4_begin_ordered_truncate,
|
|||||||
|
|
||||||
DECLARE_EVENT_CLASS(ext4__write_begin,
|
DECLARE_EVENT_CLASS(ext4__write_begin,
|
||||||
|
|
||||||
TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
|
TP_PROTO(struct inode *inode, loff_t pos, unsigned int len),
|
||||||
unsigned int flags),
|
|
||||||
|
|
||||||
TP_ARGS(inode, pos, len, flags),
|
TP_ARGS(inode, pos, len),
|
||||||
|
|
||||||
TP_STRUCT__entry(
|
TP_STRUCT__entry(
|
||||||
__field( dev_t, dev )
|
__field( dev_t, dev )
|
||||||
__field( ino_t, ino )
|
__field( ino_t, ino )
|
||||||
__field( loff_t, pos )
|
__field( loff_t, pos )
|
||||||
__field( unsigned int, len )
|
__field( unsigned int, len )
|
||||||
__field( unsigned int, flags )
|
|
||||||
),
|
),
|
||||||
|
|
||||||
TP_fast_assign(
|
TP_fast_assign(
|
||||||
@ -353,29 +351,26 @@ DECLARE_EVENT_CLASS(ext4__write_begin,
|
|||||||
__entry->ino = inode->i_ino;
|
__entry->ino = inode->i_ino;
|
||||||
__entry->pos = pos;
|
__entry->pos = pos;
|
||||||
__entry->len = len;
|
__entry->len = len;
|
||||||
__entry->flags = flags;
|
|
||||||
),
|
),
|
||||||
|
|
||||||
TP_printk("dev %d,%d ino %lu pos %lld len %u flags %u",
|
TP_printk("dev %d,%d ino %lu pos %lld len %u",
|
||||||
MAJOR(__entry->dev), MINOR(__entry->dev),
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
||||||
(unsigned long) __entry->ino,
|
(unsigned long) __entry->ino,
|
||||||
__entry->pos, __entry->len, __entry->flags)
|
__entry->pos, __entry->len)
|
||||||
);
|
);
|
||||||
|
|
||||||
DEFINE_EVENT(ext4__write_begin, ext4_write_begin,
|
DEFINE_EVENT(ext4__write_begin, ext4_write_begin,
|
||||||
|
|
||||||
TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
|
TP_PROTO(struct inode *inode, loff_t pos, unsigned int len),
|
||||||
unsigned int flags),
|
|
||||||
|
|
||||||
TP_ARGS(inode, pos, len, flags)
|
TP_ARGS(inode, pos, len)
|
||||||
);
|
);
|
||||||
|
|
||||||
DEFINE_EVENT(ext4__write_begin, ext4_da_write_begin,
|
DEFINE_EVENT(ext4__write_begin, ext4_da_write_begin,
|
||||||
|
|
||||||
TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
|
TP_PROTO(struct inode *inode, loff_t pos, unsigned int len),
|
||||||
unsigned int flags),
|
|
||||||
|
|
||||||
TP_ARGS(inode, pos, len, flags)
|
TP_ARGS(inode, pos, len)
|
||||||
);
|
);
|
||||||
|
|
||||||
DECLARE_EVENT_CLASS(ext4__write_end,
|
DECLARE_EVENT_CLASS(ext4__write_end,
|
||||||
|
@ -1159,17 +1159,15 @@ DEFINE_EVENT_CONDITION(f2fs__bio, f2fs_submit_write_bio,
|
|||||||
|
|
||||||
TRACE_EVENT(f2fs_write_begin,
|
TRACE_EVENT(f2fs_write_begin,
|
||||||
|
|
||||||
TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
|
TP_PROTO(struct inode *inode, loff_t pos, unsigned int len),
|
||||||
unsigned int flags),
|
|
||||||
|
|
||||||
TP_ARGS(inode, pos, len, flags),
|
TP_ARGS(inode, pos, len),
|
||||||
|
|
||||||
TP_STRUCT__entry(
|
TP_STRUCT__entry(
|
||||||
__field(dev_t, dev)
|
__field(dev_t, dev)
|
||||||
__field(ino_t, ino)
|
__field(ino_t, ino)
|
||||||
__field(loff_t, pos)
|
__field(loff_t, pos)
|
||||||
__field(unsigned int, len)
|
__field(unsigned int, len)
|
||||||
__field(unsigned int, flags)
|
|
||||||
),
|
),
|
||||||
|
|
||||||
TP_fast_assign(
|
TP_fast_assign(
|
||||||
@ -1177,14 +1175,12 @@ TRACE_EVENT(f2fs_write_begin,
|
|||||||
__entry->ino = inode->i_ino;
|
__entry->ino = inode->i_ino;
|
||||||
__entry->pos = pos;
|
__entry->pos = pos;
|
||||||
__entry->len = len;
|
__entry->len = len;
|
||||||
__entry->flags = flags;
|
|
||||||
),
|
),
|
||||||
|
|
||||||
TP_printk("dev = (%d,%d), ino = %lu, pos = %llu, len = %u, flags = %u",
|
TP_printk("dev = (%d,%d), ino = %lu, pos = %llu, len = %u",
|
||||||
show_dev_ino(__entry),
|
show_dev_ino(__entry),
|
||||||
(unsigned long long)__entry->pos,
|
(unsigned long long)__entry->pos,
|
||||||
__entry->len,
|
__entry->len)
|
||||||
__entry->flags)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
TRACE_EVENT(f2fs_write_end,
|
TRACE_EVENT(f2fs_write_end,
|
||||||
|
@ -3628,8 +3628,7 @@ int pagecache_write_begin(struct file *file, struct address_space *mapping,
|
|||||||
{
|
{
|
||||||
const struct address_space_operations *aops = mapping->a_ops;
|
const struct address_space_operations *aops = mapping->a_ops;
|
||||||
|
|
||||||
return aops->write_begin(file, mapping, pos, len, flags,
|
return aops->write_begin(file, mapping, pos, len, pagep, fsdata);
|
||||||
pagep, fsdata);
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(pagecache_write_begin);
|
EXPORT_SYMBOL(pagecache_write_begin);
|
||||||
|
|
||||||
@ -3754,7 +3753,6 @@ ssize_t generic_perform_write(struct kiocb *iocb, struct iov_iter *i)
|
|||||||
const struct address_space_operations *a_ops = mapping->a_ops;
|
const struct address_space_operations *a_ops = mapping->a_ops;
|
||||||
long status = 0;
|
long status = 0;
|
||||||
ssize_t written = 0;
|
ssize_t written = 0;
|
||||||
unsigned int flags = 0;
|
|
||||||
|
|
||||||
do {
|
do {
|
||||||
struct page *page;
|
struct page *page;
|
||||||
@ -3784,7 +3782,7 @@ again:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = a_ops->write_begin(file, mapping, pos, bytes, flags,
|
status = a_ops->write_begin(file, mapping, pos, bytes,
|
||||||
&page, &fsdata);
|
&page, &fsdata);
|
||||||
if (unlikely(status < 0))
|
if (unlikely(status < 0))
|
||||||
break;
|
break;
|
||||||
|
@ -2426,7 +2426,7 @@ static int shmem_initxattrs(struct inode *, const struct xattr *, void *);
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
shmem_write_begin(struct file *file, struct address_space *mapping,
|
shmem_write_begin(struct file *file, struct address_space *mapping,
|
||||||
loff_t pos, unsigned len, unsigned flags,
|
loff_t pos, unsigned len,
|
||||||
struct page **pagep, void **fsdata)
|
struct page **pagep, void **fsdata)
|
||||||
{
|
{
|
||||||
struct inode *inode = mapping->host;
|
struct inode *inode = mapping->host;
|
||||||
|
Loading…
Reference in New Issue
Block a user