Squashfs: move squashfs_i() definition from squashfs.h
Subsystems (2)
PATCH 4/5 Squashfs: move squashfs_i() definition from squashfs.h
Move squashfs_i() definition out of squashfs.h, this eliminates the need to #include squashfs_sb_i.h from numerous files.
--- fs/squashfs/block.c | 1 - fs/squashfs/cache.c | 1 - fs/squashfs/decompressor.c | 1 - fs/squashfs/fragment.c | 1 - fs/squashfs/id.c | 1 - fs/squashfs/lzo_wrapper.c | 1 - fs/squashfs/squashfs.h | 5 ----- fs/squashfs/squashfs_fs_i.h | 6 ++++++ fs/squashfs/xattr_id.c | 1 - fs/squashfs/zlib_wrapper.c | 1 - 10 files changed, 6 insertions(+), 13 deletions(-)
fs/squashfs/block.c +0 -1
@@ -34,7 +34,6 @@#include "squashfs_fs.h" #include "squashfs_fs_sb.h" -#include "squashfs_fs_i.h" #include "squashfs.h" #include "decompressor.h"
fs/squashfs/cache.c +0 -1
@@ -55,7 +55,6 @@#include "squashfs_fs.h" #include "squashfs_fs_sb.h" -#include "squashfs_fs_i.h" #include "squashfs.h" /*
fs/squashfs/decompressor.c +0 -1
@@ -27,7 +27,6 @@#include "squashfs_fs.h" #include "squashfs_fs_sb.h" -#include "squashfs_fs_i.h" #include "decompressor.h" #include "squashfs.h"
fs/squashfs/fragment.c +0 -1
@@ -39,7 +39,6 @@#include "squashfs_fs.h" #include "squashfs_fs_sb.h" -#include "squashfs_fs_i.h" #include "squashfs.h" /*
fs/squashfs/id.c +0 -1
@@ -37,7 +37,6 @@#include "squashfs_fs.h" #include "squashfs_fs_sb.h" -#include "squashfs_fs_i.h" #include "squashfs.h" /*
fs/squashfs/lzo_wrapper.c +0 -1
@@ -29,7 +29,6 @@#include "squashfs_fs.h" #include "squashfs_fs_sb.h" -#include "squashfs_fs_i.h" #include "squashfs.h" #include "decompressor.h"
fs/squashfs/squashfs.h +0 -5
@@ -27,11 +27,6 @@ #define WARNING(s, args...) pr_warning("SQUASHFS: "s, ## args) -static inline struct squashfs_inode_info *squashfs_i (struct inode *inode) -{ - return list_entry(inode, struct squashfs_inode_info, vfs_inode); -} -/* block.c */ extern int squashfs_read_data (struct super_block *,void **,u64 ,int ,u64 *,int ,int );
fs/squashfs/squashfs_fs_i.h +6 -0
@@ -45,4 +45,10 @@ struct squashfs_inode_info { };struct inode vfs_inode; }; + + +static inline struct squashfs_inode_info *squashfs_i (struct inode *inode) +{ + return list_entry(inode, struct squashfs_inode_info, vfs_inode); +}#endif
fs/squashfs/xattr_id.c +0 -1
@@ -32,7 +32,6 @@#include "squashfs_fs.h" #include "squashfs_fs_sb.h" -#include "squashfs_fs_i.h" #include "squashfs.h" #include "xattr.h"
fs/squashfs/zlib_wrapper.c +0 -1
@@ -29,7 +29,6 @@#include "squashfs_fs.h" #include "squashfs_fs_sb.h" -#include "squashfs_fs_i.h" #include "squashfs.h" #include "decompressor.h"
Signature · 1 line
1.6.3.3
Quoted 3 lines · Phillip Lougher
Move
squashfs_i()definition out ofsquashfs.h, this eliminates the need to #includesquashfs_sb_i.hfrom numerous files.
^^^^^^^^^^^^^^^
squashfs_fs_i.h?
Quoted 135 lines
Signed-off-by Phillip Lougher <[email protected]>---
fs/squashfs/block.c | 1 -
fs/squashfs/cache.c | 1 -
fs/squashfs/decompressor.c | 1 -
fs/squashfs/fragment.c | 1 -
fs/squashfs/id.c | 1 -
fs/squashfs/lzo_wrapper.c | 1 -
fs/squashfs/squashfs.h | 5 -----
fs/squashfs/squashfs_fs_i.h | 6 ++++++
fs/squashfs/xattr_id.c | 1 -
fs/squashfs/zlib_wrapper.c | 1 -10 files changed, 6 insertions(+), 13 deletions(-)fs/squashfs/block.c +0
-1@@ -34,7 +34,6 @@ #include "squashfs_fs.h" #include "squashfs_fs_sb.h" -#include "squashfs_fs_i.h" #include "squashfs.h" #include "decompressor.h"fs/squashfs/cache.c +0
-1@@ -55,7 +55,6 @@ #include "squashfs_fs.h" #include "squashfs_fs_sb.h" -#include "squashfs_fs_i.h" #include "squashfs.h" /*fs/squashfs/decompressor.c +0
-1@@ -27,7 +27,6 @@ #include "squashfs_fs.h" #include "squashfs_fs_sb.h" -#include "squashfs_fs_i.h" #include "decompressor.h" #include "squashfs.h"fs/squashfs/fragment.c +0
-1@@ -39,7 +39,6 @@ #include "squashfs_fs.h" #include "squashfs_fs_sb.h" -#include "squashfs_fs_i.h" #include "squashfs.h" /*fs/squashfs/id.c +0
-1@@ -37,7 +37,6 @@ #include "squashfs_fs.h" #include "squashfs_fs_sb.h" -#include "squashfs_fs_i.h" #include "squashfs.h" /*fs/squashfs/lzo_wrapper.c +0
-1@@ -29,7 +29,6 @@ #include "squashfs_fs.h" #include "squashfs_fs_sb.h" -#include "squashfs_fs_i.h" #include "squashfs.h" #include "decompressor.h"fs/squashfs/squashfs.h +0
-5@@ -27,11 +27,6 @@ #define WARNING(s, args...) pr_warning("SQUASHFS: "s, ## args) -static inline struct squashfs_inode_info *squashfs_i (struct inode *inode) -{ - return list_entry(inode, struct squashfs_inode_info, vfs_inode); -} - /* block.c */extern int squashfs_read_data(struct
super_block*, void **, u64, int, u64 *,
int, int);fs/squashfs/squashfs_fs_i.h +6
-0@@ -45,4 +45,10 @@ struct squashfs_inode_info { }; struct inode vfs_inode; }; + + +static inline struct squashfs_inode_info *squashfs_i (struct inode *inode) +{ + return list_entry(inode, struct squashfs_inode_info, vfs_inode); +} #endiffs/squashfs/xattr_id.c +0
-1@@ -32,7 +32,6 @@ #include "squashfs_fs.h" #include "squashfs_fs_sb.h" -#include "squashfs_fs_i.h" #include "squashfs.h" #include "xattr.h"fs/squashfs/zlib_wrapper.c +0
-0
fs/squashfs/zlib_wrapper.c line 33
Quoted 6 lines
fs/squashfs/zlib_wrapper.c +0
-1@@ -29,7 +29,6 @@ #include "squashfs_fs.h" #include "squashfs_fs_sb.h" -#include "squashfs_fs_i.h" #include "squashfs.h" #include "decompressor.h"
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Quoted 6 lines · Geert Uytterhoeven
Quoted 2 lines · Phillip Lougher
Move
squashfs_i()definition out ofsquashfs.h, this eliminates the need to #includesquashfs_sb_i.hfrom numerous files.^^^^^^^^^^^^^^^
squashfs_fs_i.h?
Not sure what you mean here, do you mean what is this file? If so then it is the inode_info definition file, as used in numerous file systems,
./fs/squashfs/squashfs_fs_i.h./fs/jffs2/jffs2_fs_i.h./fs/autofs4/autofs_i.h./fs/udf/udf_i.h./fs/fuse/fuse_i.h./include/linux/ncp_fs_i.h./include/linux/ext3_fs_i.h./include/linux/nfs_fs_i.h./include/linux/pipe_fs_i.h./include/linux/coda_fs_i.h./include/linux/reiserfs_fs_i.h./include/linux/udf_fs_i.h./drivers/staging/autofs/autofs_i.h./drivers/staging/smbfs/smb_fs_i.h
If you mean is this a typo for squashfs.h (as squashfs_i() is being moved out of squashfs.h)? ... Then no - the squashfs_i() definition relies on a struct defined in squashfs_fs_i.h, which means any file including squashfs.h needs to include squashfs_fs_i.h simply because of the squashfs_i() definition - which should have been in squashfs_fs_i.h.
Phillip
Quoted 154 lines
Quoted 136 lines
Signed-off-by Phillip Lougher <[email protected]>--- fs/squashfs/block.c | 1 - fs/squashfs/cache.c | 1 - fs/squashfs/decompressor.c | 1 - fs/squashfs/fragment.c | 1 - fs/squashfs/id.c | 1 - fs/squashfs/lzo_wrapper.c | 1 - fs/squashfs/squashfs.h | 5 ----- fs/squashfs/squashfs_fs_i.h | 6 ++++++ fs/squashfs/xattr_id.c | 1 - fs/squashfs/zlib_wrapper.c | 1 - 10 files changed, 6 insertions(+), 13 deletions(-)fs/squashfs/block.c +0
-1@@ -34,7 +34,6 @@#include "squashfs_fs.h" #include "squashfs_fs_sb.h" -#include "squashfs_fs_i.h" #include "squashfs.h" #include "decompressor.h" fs/squashfs/cache.c +0
-1@@ -55,7 +55,6 @@#include "squashfs_fs.h" #include "squashfs_fs_sb.h" -#include "squashfs_fs_i.h" #include "squashfs.h" /* fs/squashfs/decompressor.c +0
-1@@ -27,7 +27,6 @@#include "squashfs_fs.h" #include "squashfs_fs_sb.h" -#include "squashfs_fs_i.h" #include "decompressor.h" #include "squashfs.h" fs/squashfs/fragment.c +0
-1@@ -39,7 +39,6 @@#include "squashfs_fs.h" #include "squashfs_fs_sb.h" -#include "squashfs_fs_i.h" #include "squashfs.h" /* fs/squashfs/id.c +0
-1@@ -37,7 +37,6 @@#include "squashfs_fs.h" #include "squashfs_fs_sb.h" -#include "squashfs_fs_i.h" #include "squashfs.h" /* fs/squashfs/lzo_wrapper.c +0
-1@@ -29,7 +29,6 @@#include "squashfs_fs.h" #include "squashfs_fs_sb.h" -#include "squashfs_fs_i.h" #include "squashfs.h" #include "decompressor.h" fs/squashfs/squashfs.h +0
-5@@ -27,11 +27,6 @@ #define WARNING(s, args...) pr_warning("SQUASHFS: "s, ## args) -static inline struct squashfs_inode_info *squashfs_i (struct inode *inode) -{ - return list_entry(inode, struct squashfs_inode_info, vfs_inode); -} -/* block.c */ extern int squashfs_read_data(struct super_block *, void **, u64, int, u64 *,int, int);fs/squashfs/squashfs_fs_i.h +6
-0@@ -45,4 +45,10 @@ struct squashfs_inode_info { };struct inode vfs_inode; }; + + +static inline struct squashfs_inode_info *squashfs_i (struct inode *inode) +{ + return list_entry(inode, struct squashfs_inode_info, vfs_inode); +}#endif fs/squashfs/xattr_id.c +0
-1@@ -32,7 +32,6 @@#include "squashfs_fs.h" #include "squashfs_fs_sb.h" -#include "squashfs_fs_i.h" #include "squashfs.h" #include "xattr.h" fs/squashfs/zlib_wrapper.c +0
-0fs/squashfs/zlib_wrapper.c line 33
Quoted 6 lines
fs/squashfs/zlib_wrapper.c +0
-1@@ -29,7 +29,6 @@#include "squashfs_fs.h" #include "squashfs_fs_sb.h" -#include "squashfs_fs_i.h" #include "squashfs.h" #include "decompressor.h" Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 6 lines · Geert Uytterhoeven
Quoted 2 lines · Phillip Lougher
Move
squashfs_i()definition out ofsquashfs.h, this eliminates the need to #includesquashfs_sb_i.hfrom numerous files.^^^^^^^^^^^^^^^
squashfs_fs_i.h?
Oops, now I see what you mean... Yes that should be squashfs_fs_i.h rather than squashfs_sb_i.h.
Classic case of seeing what you meant to write (rather than what you actually wrote), even after it's been pointed out!
Thanks
Phillip