[PATCH -mm] fs.h: fix build error with !CONFIG_FILE_LOCKING

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alexander Beregalov
Date: Friday, August 8, 2008 - 3:32 pm

I am not sure it is a right way to fix it, please review.
Commit 4a70917f881a38ae688c98be9396f0a38f559094
(configure-out-file-locking-features) changed behaviour.

From: Alexander Beregalov <a.beregalov@gmail.com>

fs.h: fix build error with !CONFIG_FILE_LOCKING

fs/gfs2/ops_file.c:585: error: implicit declaration of function 'generic_setlease'
fs/gfs2/ops_file.c:637: error: implicit declaration of function '__mandatory_lock'


Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---

 include/linux/fs.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index e9a7a7d..42d9ff9 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1051,6 +1051,8 @@ extern struct seq_operations locks_seq_operations;
 #define flock_lock_file_wait(a, b) (-ENOLCK)
 #define __break_lease(a, b) (0)
 #define lease_get_mtime(a, b)
+#define generic_setlease(a, b, c) (0)
+#define vfs_setlease(a, b, c) (0)
 #define lock_may_read(a, b, c) (1)
 #define lock_may_write(a, b, c) (1)
 #endif /* !CONFIG_FILE_LOCKING */
@@ -1647,6 +1649,7 @@ static inline int break_lease(struct inode *inode, unsigned int mode)
 #else /* !CONFIG_FILE_LOCKING */
 #define locks_mandatory_locked(a) (0)
 #define locks_mandatory_area(a, b, c, d, e) (0)
+#define __mandatory_lock(a) (0)
 #define mandatory_lock(a) (0)
 #define locks_verify_locked(a) (0)
 #define locks_verify_truncate(a, b, c) (0)
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH -mm] fs.h: fix build error with !CONFIG_FILE_LOCKING, Alexander Beregalov, (Fri Aug 8, 3:32 pm)
Re: [PATCH -mm] fs.h: fix build error with !CONFIG_FILE_LO ..., Alexander Beregalov, (Thu Aug 14, 3:51 am)