diff options
author | Jan Engelhardt <jengelh@linux01.gwdg.de> | 2006-12-06 20:35:37 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 08:39:31 -0800 |
commit | 48ed214d10ae3c3999af938970f7b5b58df77be3 (patch) | |
tree | 07c51258c2294279521a10b5d28b66cdaa001796 /include/linux/fs.h | |
parent | 89fc9a1a79725c3e5c3b66cb6bd2c7d9eeab29fa (diff) | |
download | op-kernel-dev-48ed214d10ae3c3999af938970f7b5b58df77be3.zip op-kernel-dev-48ed214d10ae3c3999af938970f7b5b58df77be3.tar.gz |
[PATCH] constify inode accessors
Change the signature of i_size_read(), IMINOR() and IMAJOR() because they,
or the functions they call, will never modify the argument.
Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 94b831b..d791bae 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -636,7 +636,7 @@ extern void inode_double_unlock(struct inode *inode1, struct inode *inode2); * cmpxchg8b without the need of the lock prefix). For SMP compiles * and 64bit archs it makes no difference if preempt is enabled or not. */ -static inline loff_t i_size_read(struct inode *inode) +static inline loff_t i_size_read(const struct inode *inode) { #if BITS_PER_LONG==32 && defined(CONFIG_SMP) loff_t i_size; @@ -679,12 +679,12 @@ static inline void i_size_write(struct inode *inode, loff_t i_size) #endif } -static inline unsigned iminor(struct inode *inode) +static inline unsigned iminor(const struct inode *inode) { return MINOR(inode->i_rdev); } -static inline unsigned imajor(struct inode *inode) +static inline unsigned imajor(const struct inode *inode) { return MAJOR(inode->i_rdev); } |