Skip to contentSkip to conversation

Export __locks_copy_lock() so modular lockd builds

PATCH In review Roland Dreier 2 participants 2 messages Apr 25, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Export __locks_copy_lock() so modular lockd builds

Commit 1a747ee0 ("locks: don't call ->copy_lock methods on return of conflicting locks") changed fs/lockd/svclock.c to call __locks_copy_lock() instead of locks_copy_lock(), but lockd can be built as a module and __locks_copy_lock() is not exported, which causes a build error

ERROR: "__locks_copy_lock" [fs/lockd/lockd.ko] undefined!

with CONFIG_LOCKD=m.

Fix this by exporting __locks_copy_lock().

---
 fs/locks.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/locks.c +1 -0
index e1ea2fe..44d9a6a 100644
@@ -236,6 +236,7 @@ void __locks_copy_lock(struct file_lock *new, const struct file_lock *fl)
 	new->fl_ops = NULL;
 	new->fl_lmops = NULL;
 }
+EXPORT_SYMBOL(__locks_copy_lock);
 
 void locks_copy_lock(struct file_lock *new, struct file_lock *fl)
 {
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Roland Dreier

Commit 1a747ee0 ("locks: don't call ->copy_lock methods on return of conflicting locks") changed fs/lockd/svclock.c to call __locks_copy_lock() instead of locks_copy_lock(), but lockd can be built as a module and __locks_copy_lock() is not exported, which causes a build error

ERROR: "__locks_copy_lock" [fs/lockd/lockd.ko] undefined!

with CONFIG_LOCKD=m.

Fix this by exporting __locks_copy_lock().

Oog, sorry. Thaks for the fix!

Quoted 2 lines
Quoted 16 lines
---
 fs/locks.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/locks.c +1 -0
index e1ea2fe..44d9a6a 100644
@@ -236,6 +236,7 @@ void __locks_copy_lock(struct file_lock *new, const struct file_lock *fl)
 	new->fl_ops = NULL;
 	new->fl_lmops = NULL;
 }
+EXPORT_SYMBOL(__locks_copy_lock);
 
 void locks_copy_lock(struct file_lock *new, struct file_lock *fl)
 {