Skip to contentSkip to conversation

fs/sync.c: make do_sync_file_range() static

RFC PATCH In review Adrian Bunk 2 participants 2 messages May 1, 2006 VFS

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 fs/sync.c: make do_sync_file_range() static

This patch makes the needlessly global do_sync_file_range() static.

---

This patch was already sent on:
- 23 Apr 2006

 fs/sync.c          |    8 +++++---
 include/linux/fs.h |    2 --
 2 files changed, 5 insertions(+), 5 deletions(-)
include/linux/fs.h renamed from include/linux/fs.h.old +0 -2
@@ -762,8 +762,6 @@
 #define SYNC_FILE_RANGE_WAIT_BEFORE	1
 #define SYNC_FILE_RANGE_WRITE		2
 #define SYNC_FILE_RANGE_WAIT_AFTER	4
-extern int do_sync_file_range(struct file *file, loff_t offset, loff_t endbyte,
-			unsigned int flags);
 
 /* fs/locks.c */
 extern void locks_init_lock(struct file_lock *);
fs/sync.c renamed from fs/sync.c.old +5 -3
@@ -14,6 +14,9 @@
 #define VALID_FLAGS (SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE| \
 			SYNC_FILE_RANGE_WAIT_AFTER)
 
+static int do_sync_file_range(struct file *file, loff_t offset, loff_t endbyte,
+			      unsigned int flags);
+
 /*
  * sys_sync_file_range() permits finely controlled syncing over a segment of
  * a file in the range offset .. (offset+nbytes-1) inclusive.  If nbytes is
@@ -125,8 +128,8 @@
 /*
  * `endbyte' is inclusive
  */
-int do_sync_file_range(struct file *file, loff_t offset, loff_t endbyte,
-			unsigned int flags)
+static int do_sync_file_range(struct file *file, loff_t offset, loff_t endbyte,
+			      unsigned int flags)
 {
 	int ret;
 	struct address_space *mapping;
@@ -161,4 +164,3 @@
 out:
 	return ret;
 }
-EXPORT_SYMBOL_GPL(do_sync_file_range);
#1 lore raw
Quoted 1 line · On Monday May 1, [email protected] wrote:

This patch makes the needlessly global do_sync_file_range() static.

I'm planning to use that in nfsd. Just haven't got there yet.

NeilBrown