From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 2/2] vfs: Further changes from macro to inline function in fs.h
Date: Tue, 27 Jan 2009 07:45:28 +0000 [thread overview]
Message-ID: <1233042328-24120-3-git-send-email-swhiteho@redhat.com> (raw)
In-Reply-To: <1233042328-24120-2-git-send-email-swhiteho@redhat.com>
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>
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 392c18a..7f5d794 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1794,13 +1794,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 */
--
1.6.0.3
next prev parent reply other threads:[~2009-01-27 7:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20090126234419.678746f2.akpm@linux-foundation.org>
2009-01-27 7:45 ` [Cluster-devel] [resend] vfs: Change some macros into inline functions Steven Whitehouse
2009-01-27 7:45 ` [Cluster-devel] [PATCH 1/2] vfs: Update fs.h to use inline functions when no file locking set Steven Whitehouse
2009-01-27 7:45 ` Steven Whitehouse [this message]
2009-01-20 10:29 [Cluster-devel] vfs: Proposed patches for fs.h Steven Whitehouse
2009-01-20 10:29 ` [Cluster-devel] [PATCH 1/2] vfs: Update fs.h to use inline functions when no file locking set Steven Whitehouse
2009-01-20 10:29 ` [Cluster-devel] [PATCH 2/2] vfs: Further changes from macro to inline function in fs.h Steven Whitehouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1233042328-24120-3-git-send-email-swhiteho@redhat.com \
--to=swhiteho@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).