|
@@ -2030,7 +2030,7 @@ extern struct kobject *fs_kobj;
|
|
|
#define FLOCK_VERIFY_READ 1
|
|
|
#define FLOCK_VERIFY_WRITE 2
|
|
|
|
|
|
-#ifdef CONFIG_FILE_LOCKING
|
|
|
+#ifdef CONFIG_MANDATORY_FILE_LOCKING
|
|
|
extern int locks_mandatory_locked(struct file *);
|
|
|
extern int locks_mandatory_area(int, struct inode *, struct file *, loff_t, size_t);
|
|
|
|
|
@@ -2075,6 +2075,45 @@ static inline int locks_verify_truncate(struct inode *inode,
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+#else /* !CONFIG_MANDATORY_FILE_LOCKING */
|
|
|
+
|
|
|
+static inline int locks_mandatory_locked(struct file *file)
|
|
|
+{
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+static inline int locks_mandatory_area(int rw, struct inode *inode,
|
|
|
+ struct file *filp, loff_t offset,
|
|
|
+ size_t count)
|
|
|
+{
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+static inline int __mandatory_lock(struct inode *inode)
|
|
|
+{
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+static inline int mandatory_lock(struct inode *inode)
|
|
|
+{
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+static inline int locks_verify_locked(struct file *file)
|
|
|
+{
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+static inline int locks_verify_truncate(struct inode *inode, struct file *filp,
|
|
|
+ size_t size)
|
|
|
+{
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+#endif /* CONFIG_MANDATORY_FILE_LOCKING */
|
|
|
+
|
|
|
+
|
|
|
+#ifdef CONFIG_FILE_LOCKING
|
|
|
static inline int break_lease(struct inode *inode, unsigned int mode)
|
|
|
{
|
|
|
/*
|
|
@@ -2136,39 +2175,6 @@ static inline int break_layout(struct inode *inode, bool wait)
|
|
|
}
|
|
|
|
|
|
#else /* !CONFIG_FILE_LOCKING */
|
|
|
-static inline int locks_mandatory_locked(struct file *file)
|
|
|
-{
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
-static inline int locks_mandatory_area(int rw, struct inode *inode,
|
|
|
- struct file *filp, loff_t offset,
|
|
|
- size_t count)
|
|
|
-{
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
-static inline int __mandatory_lock(struct inode *inode)
|
|
|
-{
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
-static inline int mandatory_lock(struct inode *inode)
|
|
|
-{
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
-static inline int locks_verify_locked(struct file *file)
|
|
|
-{
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
-static inline int locks_verify_truncate(struct inode *inode, struct file *filp,
|
|
|
- size_t size)
|
|
|
-{
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
static inline int break_lease(struct inode *inode, unsigned int mode)
|
|
|
{
|
|
|
return 0;
|