From 5bb44810f47a00b608ed2cb9f892ae7ce37b02bd Mon Sep 17 00:00:00 2001 From: Fabian Frederick Date: Tue, 16 Jul 2019 16:29:09 -0700 Subject: coda: ftoc validity check integration This patch moves cfi check in coda_ftoc() instead of repeating it in the wild. Module size text data bss dec hex filename 28297 1040 700 30037 7555 fs/coda/coda.ko.before 28263 980 700 29943 74f7 fs/coda/coda.ko.after Link: http://lkml.kernel.org/r/a2c27663ec4547018c92d71c63b1dff4650b6546.1558117389.git.jaharkes@cs.cmu.edu Signed-off-by: Fabian Frederick Signed-off-by: Jan Harkes Cc: Arnd Bergmann Cc: Colin Ian King Cc: Dan Carpenter Cc: David Howells Cc: Mikko Rapeli Cc: Sam Protsenko Cc: Yann Droneaud Cc: Zhouyang Jia Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/coda/coda_fs_i.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fs/coda/coda_fs_i.h') diff --git a/fs/coda/coda_fs_i.h b/fs/coda/coda_fs_i.h index d702ba1a2bf9..c99d574d1c43 100644 --- a/fs/coda/coda_fs_i.h +++ b/fs/coda/coda_fs_i.h @@ -42,8 +42,6 @@ struct coda_file_info { unsigned int cfi_mapcount; /* nr of times this file is mapped */ }; -#define CODA_FTOC(file) ((struct coda_file_info *)((file)->private_data)) - /* flags */ #define C_VATTR 0x1 /* Validity of vattr in inode */ #define C_FLUSH 0x2 /* used after a flush */ @@ -54,6 +52,7 @@ struct inode *coda_cnode_make(struct CodaFid *, struct super_block *); struct inode *coda_iget(struct super_block *sb, struct CodaFid *fid, struct coda_vattr *attr); struct inode *coda_cnode_makectl(struct super_block *sb); struct inode *coda_fid_to_inode(struct CodaFid *fid, struct super_block *sb); +struct coda_file_info *coda_ftoc(struct file *file); void coda_replace_fid(struct inode *, struct CodaFid *, struct CodaFid *); #endif -- cgit v1.2.3