linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* make flock_lock_file_wait static
@ 2005-01-09 19:42 Arjan van de Ven
  2005-01-09 22:44 ` Trond Myklebust
  0 siblings, 1 reply; 24+ messages in thread
From: Arjan van de Ven @ 2005-01-09 19:42 UTC (permalink / raw)
  To: viro; +Cc: linux-kernel, akpm

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 **);


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2005-01-28 19:09 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-09 19:42 make flock_lock_file_wait static Arjan van de Ven
2005-01-09 22:44 ` 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

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).