linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: viro@zenII.uk.linux.org
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: make flock_lock_file_wait static
Date: Sun, 9 Jan 2005 19:42:09 +0000	[thread overview]
Message-ID: <20050109194209.GA7588@infradead.org> (raw)

Hi,

the patch below makes flock_lock_file_wait static, because it is only used
(once) in fs/locks.c. Making it static allows gcc to generate better code
(partial or entirely inlining it, gcc 3.4 also optimizes the calling
convention for static functions which are guaranteed only local to the file)


Signed-off-by: Arjan van de Ven <arjan@infradead.org>

diff -purN linux-2.6.10/fs/locks.c linux/fs/locks.c
--- linux-2.6.10/fs/locks.c	2005-01-09 14:51:10.101125171 +0100
+++ linux/fs/locks.c	2005-01-09 20:39:44.930216959 +0100
@@ -1451,7 +1451,7 @@ out_unlock:
  *
  * Add a FLOCK style lock to a file.
  */
-int flock_lock_file_wait(struct file *filp, struct file_lock *fl)
+static int flock_lock_file_wait(struct file *filp, struct file_lock *fl)
 {
 	int error;
 	might_sleep();
@@ -1469,8 +1469,6 @@ int flock_lock_file_wait(struct file *fi
 	return error;
 }
 
-EXPORT_SYMBOL(flock_lock_file_wait);
-
 /**
  *	sys_flock: - flock() system call.
  *	@fd: the file descriptor to lock.
diff -purN linux-2.6.10/include/linux/fs.h linux/include/linux/fs.h
--- linux-2.6.10/include/linux/fs.h	2005-01-09 14:51:10.293101584 +0100
+++ linux/include/linux/fs.h	2005-01-09 20:39:18.678389875 +0100
@@ -709,7 +709,6 @@ extern int posix_lock_file_wait(struct f
 extern void posix_block_lock(struct file_lock *, struct file_lock *);
 extern void posix_unblock_lock(struct file *, struct file_lock *);
 extern int posix_locks_deadlock(struct file_lock *, struct file_lock *);
-extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl);
 extern int __break_lease(struct inode *inode, unsigned int flags);
 extern void lease_get_mtime(struct inode *, struct timespec *time);
 extern int setlease(struct file *, long, struct file_lock **);


             reply	other threads:[~2005-01-09 19:42 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-09 19:42 Arjan van de Ven [this message]
2005-01-09 22:44 ` make flock_lock_file_wait static Trond Myklebust
2005-01-10  8:19   ` Arjan van de Ven
2005-01-10  8:38     ` Arjan van de Ven
2005-01-10 14:23       ` Trond Myklebust
2005-01-11  8:31         ` Arjan van de Ven
2005-01-11 19:16           ` Trond Myklebust
2005-01-11 19:36             ` Arjan van de Ven
2005-01-25 18:58               ` Paul E. McKenney
2005-01-26  3:10                 ` Andrew Morton
2005-01-26  9:01                 ` Arjan van de Ven
2005-01-26 16:07                   ` Paul E. McKenney
2005-01-26 18:59                     ` Arjan van de Ven
2005-01-28 14:14                       ` Paul E. McKenney
2005-01-28 18:50                         ` Christoph Hellwig
2005-01-28 19:01                         ` Arjan van de Ven
2005-01-26  9:43                 ` Christoph Hellwig
2005-01-26  9:51                   ` Al Viro
2005-01-26  9:55                     ` Christoph Hellwig
2005-01-26 10:00                       ` Al Viro
2005-01-15 21:35             ` Adrian Bunk
2005-01-15 22:07               ` Trond Myklebust
2005-01-10  8:35   ` Ken Preslan
2005-01-10  8:44     ` Arjan van de Ven

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=20050109194209.GA7588@infradead.org \
    --to=arjan@infradead.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zenII.uk.linux.org \
    /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).