From: Andreas Dilger <adilger@clusterfs.com>
To: linux-kernel@vger.kernel.org
Cc: Marco van Wieringen <mvw@planets.elm.net>
Subject: [PATCH] remove extern inline from quotaops.h
Date: Mon, 4 Nov 2002 14:13:17 -0700 [thread overview]
Message-ID: <20021104141317.A29058@mookie.adilger.int> (raw)
We are having a strange problem with compiling ext3 code out-of-tree,
and it is related to the fact that several functions in quotaops.h
are declared "extern __inline__" instead of "static inline". Is
there a good reason to have it that way? I thought "extern __inline__"
was sort of frowned upon.
Below is a patch to change this to "static inline". A similar patch is
needed for 2.5, but the file has changed significantly...
Cheers, Andreas
=============================================================================
--- linux-2.4/include/linux/quotaops.h.orig Wed Oct 30 17:10:48 2002
+++ linux-2.4/include/linux/quotaops.h Mon Nov 4 13:53:05 2002
@@ -38,9 +38,9 @@
*/
#define sb_any_quota_enabled(sb) ((sb)->s_dquot.flags & (DQUOT_USR_ENABLED | DQUOT_GRP_ENABLED))
-static __inline__ void DQUOT_INIT(struct inode *inode)
+static inline void DQUOT_INIT(struct inode *inode)
{
- if (!inode->i_sb)
+ if (!inode->i_sb)
out_of_line_bug();
lock_kernel();
if (sb_any_quota_enabled(inode->i_sb) && !IS_NOQUOTA(inode))
@@ -48,18 +48,19 @@
unlock_kernel();
}
-static __inline__ void DQUOT_DROP(struct inode *inode)
+static inline void DQUOT_DROP(struct inode *inode)
{
lock_kernel();
if (IS_QUOTAINIT(inode)) {
if (!inode->i_sb)
out_of_line_bug();
- inode->i_sb->dq_op->drop(inode); /* Ops must be set when there's any quota... */
+ /* Ops must be set when there's any quota... */
+ inode->i_sb->dq_op->drop(inode);
}
unlock_kernel();
}
-static __inline__ int DQUOT_PREALLOC_SPACE_NODIRTY(struct inode *inode, qsize_t nr)
+static inline int DQUOT_PREALLOC_SPACE_NODIRTY(struct inode *inode, qsize_t nr)
{
lock_kernel();
if (sb_any_quota_enabled(inode->i_sb)) {
@@ -75,7 +76,7 @@
return 0;
}
-static __inline__ int DQUOT_PREALLOC_SPACE(struct inode *inode, qsize_t nr)
+static inline int DQUOT_PREALLOC_SPACE(struct inode *inode, qsize_t nr)
{
int ret;
if (!(ret = DQUOT_PREALLOC_SPACE_NODIRTY(inode, nr)))
@@ -83,7 +84,7 @@
return ret;
}
-static __inline__ int DQUOT_ALLOC_SPACE_NODIRTY(struct inode *inode, qsize_t nr)
+static inline int DQUOT_ALLOC_SPACE_NODIRTY(struct inode *inode, qsize_t nr)
{
lock_kernel();
if (sb_any_quota_enabled(inode->i_sb)) {
@@ -99,7 +100,7 @@
return 0;
}
-static __inline__ int DQUOT_ALLOC_SPACE(struct inode *inode, qsize_t nr)
+static inline int DQUOT_ALLOC_SPACE(struct inode *inode, qsize_t nr)
{
int ret;
if (!(ret = DQUOT_ALLOC_SPACE_NODIRTY(inode, nr)))
@@ -107,7 +108,7 @@
return ret;
}
-static __inline__ int DQUOT_ALLOC_INODE(struct inode *inode)
+static inline int DQUOT_ALLOC_INODE(struct inode *inode)
{
lock_kernel();
if (sb_any_quota_enabled(inode->i_sb)) {
@@ -121,7 +122,7 @@
return 0;
}
-static __inline__ void DQUOT_FREE_SPACE_NODIRTY(struct inode *inode, qsize_t nr)
+static inline void DQUOT_FREE_SPACE_NODIRTY(struct inode *inode, qsize_t nr)
{
lock_kernel();
if (sb_any_quota_enabled(inode->i_sb))
@@ -131,13 +132,13 @@
unlock_kernel();
}
-static __inline__ void DQUOT_FREE_SPACE(struct inode *inode, qsize_t nr)
+static inline void DQUOT_FREE_SPACE(struct inode *inode, qsize_t nr)
{
DQUOT_FREE_SPACE_NODIRTY(inode, nr);
mark_inode_dirty(inode);
}
-
-static __inline__ void DQUOT_FREE_INODE(struct inode *inode)
+
+static inline void DQUOT_FREE_INODE(struct inode *inode)
{
lock_kernel();
if (sb_any_quota_enabled(inode->i_sb))
@@ -145,7 +146,7 @@
unlock_kernel();
}
-static __inline__ int DQUOT_TRANSFER(struct inode *inode, struct iattr *iattr)
+static inline int DQUOT_TRANSFER(struct inode *inode, struct iattr *iattr)
{
lock_kernel();
if (sb_any_quota_enabled(inode->i_sb) && !IS_NOQUOTA(inode)) {
@@ -174,7 +175,7 @@
#define DQUOT_SYNC(dev) do { } while(0)
#define DQUOT_OFF(sb) do { } while(0)
#define DQUOT_TRANSFER(inode, iattr) (0)
-extern __inline__ int DQUOT_PREALLOC_SPACE_NODIRTY(struct inode *inode, qsize_t nr)
+static inline int DQUOT_PREALLOC_SPACE_NODIRTY(struct inode *inode, qsize_t nr)
{
lock_kernel();
inode_add_bytes(inode, nr);
@@ -182,14 +183,14 @@
return 0;
}
-extern __inline__ int DQUOT_PREALLOC_SPACE(struct inode *inode, qsize_t nr)
+static inline int DQUOT_PREALLOC_SPACE(struct inode *inode, qsize_t nr)
{
DQUOT_PREALLOC_SPACE_NODIRTY(inode, nr);
mark_inode_dirty(inode);
return 0;
}
-extern __inline__ int DQUOT_ALLOC_SPACE_NODIRTY(struct inode *inode, qsize_t nr)
+static inline int DQUOT_ALLOC_SPACE_NODIRTY(struct inode *inode, qsize_t nr)
{
lock_kernel();
inode_add_bytes(inode, nr);
@@ -197,21 +198,21 @@
return 0;
}
-extern __inline__ int DQUOT_ALLOC_SPACE(struct inode *inode, qsize_t nr)
+static inline int DQUOT_ALLOC_SPACE(struct inode *inode, qsize_t nr)
{
DQUOT_ALLOC_SPACE_NODIRTY(inode, nr);
mark_inode_dirty(inode);
return 0;
}
-extern __inline__ void DQUOT_FREE_SPACE_NODIRTY(struct inode *inode, qsize_t nr)
+static inline void DQUOT_FREE_SPACE_NODIRTY(struct inode *inode, qsize_t nr)
{
lock_kernel();
inode_sub_bytes(inode, nr);
unlock_kernel();
}
-extern __inline__ void DQUOT_FREE_SPACE(struct inode *inode, qsize_t nr)
+static inline void DQUOT_FREE_SPACE(struct inode *inode, qsize_t nr)
{
DQUOT_FREE_SPACE_NODIRTY(inode, nr);
mark_inode_dirty(inode);
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/
next reply other threads:[~2002-11-04 21:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-04 21:13 Andreas Dilger [this message]
2002-11-06 20:11 ` Denis Vlasenko
2002-11-06 18:27 ` Andrew Morton
2002-11-06 18:43 ` Christoph Hellwig
2002-11-06 19:09 ` Andrew Morton
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=20021104141317.A29058@mookie.adilger.int \
--to=adilger@clusterfs.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mvw@planets.elm.net \
/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
all inboxes | Powered by JetHome®