summaryrefslogtreecommitdiff
path: root/fs/fuse/file.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2018-10-01 10:07:05 +0200
committerMiklos Szeredi <mszeredi@redhat.com>2018-10-01 10:07:05 +0200
commitab2257e9941b9ef28d4a4a451e4b146d40a21e18 (patch)
treef4c4b558fcec9846ea840ea721d494327c5192b4 /fs/fuse/file.c
parent261aaba72fdba17b74a3a434d9f925b43d90e958 (diff)
fuse: reduce size of struct fuse_inode
Do this by grouping fields used for cached writes and putting them into a union with fileds used for cached readdir (with obviously no overlap, since we don't have hybrid objects). Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/file.c')
-rw-r--r--fs/fuse/file.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index e10c0443c56f..b10d14baeb1f 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -3143,6 +3143,14 @@ static const struct address_space_operations fuse_file_aops = {
void fuse_init_file_inode(struct inode *inode)
{
+ struct fuse_inode *fi = get_fuse_inode(inode);
+
inode->i_fop = &fuse_file_operations;
inode->i_data.a_ops = &fuse_file_aops;
+
+ INIT_LIST_HEAD(&fi->write_files);
+ INIT_LIST_HEAD(&fi->queued_writes);
+ fi->writectr = 0;
+ init_waitqueue_head(&fi->page_waitq);
+ INIT_LIST_HEAD(&fi->writepages);
}