make flock_lock_file_wait static

From: Arjan van de Ven
Date: Sun Jan 09 2005 - 14:45:33 EST


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@xxxxxxxxxxxxx>

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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/