summaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorSteven Whitehouse2009-01-20 11:29:46 +0100
committerAl Viro2009-03-27 19:43:59 +0100
commitaf5df56688acfb75c1b15b4e000ec5e82a9cdc29 (patch)
tree26ba8c442768453fb3fde2e9b55d05d95a6f5b02 /include/linux/fs.h
parentvfs: Update fs.h to use inline functions when no file locking set (diff)
downloadkernel-qcow2-linux-af5df56688acfb75c1b15b4e000ec5e82a9cdc29.tar.gz
kernel-qcow2-linux-af5df56688acfb75c1b15b4e000ec5e82a9cdc29.tar.xz
kernel-qcow2-linux-af5df56688acfb75c1b15b4e000ec5e82a9cdc29.zip
vfs: Further changes from macro to inline function in fs.h
There is a second set of macros for when CONFIG_FILE_LOCKING is not set. This patch updates those to become inline functions as well. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h45
1 files changed, 38 insertions, 7 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index d84020b7e676..5f74d616cd7d 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1800,13 +1800,44 @@ static inline int break_lease(struct inode *inode, unsigned int mode)
return 0;
}
#else /* !CONFIG_FILE_LOCKING */
-#define locks_mandatory_locked(a) ({ 0; })
-#define locks_mandatory_area(a, b, c, d, e) ({ 0; })
-#define __mandatory_lock(a) ({ 0; })
-#define mandatory_lock(a) ({ 0; })
-#define locks_verify_locked(a) ({ 0; })
-#define locks_verify_truncate(a, b, c) ({ 0; })
-#define break_lease(a, b) ({ 0; })
+static inline int locks_mandatory_locked(struct inode *inode)
+{
+ return 0;
+}
+
+static inline int locks_mandatory_area(int rw, struct inode *inode,
+ struct file *filp, loff_t offset,
+ size_t count)
+{
+ return 0;
+}
+
+static inline int __mandatory_lock(struct inode *inode)
+{
+ return 0;
+}
+
+static inline int mandatory_lock(struct inode *inode)
+{
+ return 0;
+}
+
+static inline int locks_verify_locked(struct inode *inode)
+{
+ return 0;
+}
+
+static inline int locks_verify_truncate(struct inode *inode, struct file *filp,
+ size_t size)
+{
+ return 0;
+}
+
+static inline int break_lease(struct inode *inode, unsigned int mode)
+{
+ return 0;
+}
+
#endif /* CONFIG_FILE_LOCKING */
/* fs/open.c */