aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-14 15:31:14 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-14 15:31:14 -0400
commit8acd3a60bcca17c6d89c73cee3ad6057eb83ba1e (patch)
treed610c8d39246c33c499ee9d92d302d3ca9e89ae3 /include/linux/fs.h
parentc269bc00fcb876ae3b85f178f1e34601185c8ccc (diff)
parent107e0008dfb8bd6366bc8827f5bbbc0c1f795d2d (diff)
Merge branch 'for-2.6.28' of git://linux-nfs.org/~bfields/linux
* 'for-2.6.28' of git://linux-nfs.org/~bfields/linux: (59 commits) svcrdma: Fix IRD/ORD polarity svcrdma: Update svc_rdma_send_error to use DMA LKEY svcrdma: Modify the RPC reply path to use FRMR when available svcrdma: Modify the RPC recv path to use FRMR when available svcrdma: Add support to svc_rdma_send to handle chained WR svcrdma: Modify post recv path to use local dma key svcrdma: Add a service to register a Fast Reg MR with the device svcrdma: Query device for Fast Reg support during connection setup svcrdma: Add FRMR get/put services NLM: Remove unused argument from svc_addsock() function NLM: Remove "proto" argument from lockd_up() NLM: Always start both UDP and TCP listeners lockd: Remove unused fields in the nlm_reboot structure lockd: Add helper to sanity check incoming NOTIFY requests lockd: change nlmclnt_grant() to take a "struct sockaddr *" lockd: Adjust nlmsvc_lookup_host() to accomodate AF_INET6 addresses lockd: Adjust nlmclnt_lookup_host() signature to accomodate non-AF_INET lockd: Support non-AF_INET addresses in nlm_lookup_host() NLM: Convert nlm_lookup_host() to use a single argument svcrdma: Add Fast Reg MR Data Types ...
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h65
1 files changed, 58 insertions, 7 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 44e3cb2f1966..a6a625be13fc 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -947,6 +947,14 @@ struct lock_manager_operations {
947 int (*fl_change)(struct file_lock **, int); 947 int (*fl_change)(struct file_lock **, int);
948}; 948};
949 949
950struct lock_manager {
951 struct list_head list;
952};
953
954void locks_start_grace(struct lock_manager *);
955void locks_end_grace(struct lock_manager *);
956int locks_in_grace(void);
957
950/* that will die - we need it for nfs_lock_info */ 958/* that will die - we need it for nfs_lock_info */
951#include <linux/nfs_fs_i.h> 959#include <linux/nfs_fs_i.h>
952 960
@@ -988,6 +996,13 @@ struct file_lock {
988 996
989#include <linux/fcntl.h> 997#include <linux/fcntl.h>
990 998
999extern void send_sigio(struct fown_struct *fown, int fd, int band);
1000
1001/* fs/sync.c */
1002extern int do_sync_mapping_range(struct address_space *mapping, loff_t offset,
1003 loff_t endbyte, unsigned int flags);
1004
1005#ifdef CONFIG_FILE_LOCKING
991extern int fcntl_getlk(struct file *, struct flock __user *); 1006extern int fcntl_getlk(struct file *, struct flock __user *);
992extern int fcntl_setlk(unsigned int, struct file *, unsigned int, 1007extern int fcntl_setlk(unsigned int, struct file *, unsigned int,
993 struct flock __user *); 1008 struct flock __user *);
@@ -998,14 +1013,9 @@ extern int fcntl_setlk64(unsigned int, struct file *, unsigned int,
998 struct flock64 __user *); 1013 struct flock64 __user *);
999#endif 1014#endif
1000 1015
1001extern void send_sigio(struct fown_struct *fown, int fd, int band);
1002extern int fcntl_setlease(unsigned int fd, struct file *filp, long arg); 1016extern int fcntl_setlease(unsigned int fd, struct file *filp, long arg);
1003extern int fcntl_getlease(struct file *filp); 1017extern int fcntl_getlease(struct file *filp);
1004 1018
1005/* fs/sync.c */
1006extern int do_sync_mapping_range(struct address_space *mapping, loff_t offset,
1007 loff_t endbyte, unsigned int flags);
1008
1009/* fs/locks.c */ 1019/* fs/locks.c */
1010extern void locks_init_lock(struct file_lock *); 1020extern void locks_init_lock(struct file_lock *);
1011extern void locks_copy_lock(struct file_lock *, struct file_lock *); 1021extern void locks_copy_lock(struct file_lock *, struct file_lock *);
@@ -1028,6 +1038,37 @@ extern int lease_modify(struct file_lock **, int);
1028extern int lock_may_read(struct inode *, loff_t start, unsigned long count); 1038extern int lock_may_read(struct inode *, loff_t start, unsigned long count);
1029extern int lock_may_write(struct inode *, loff_t start, unsigned long count); 1039extern int lock_may_write(struct inode *, loff_t start, unsigned long count);
1030extern struct seq_operations locks_seq_operations; 1040extern struct seq_operations locks_seq_operations;
1041#else /* !CONFIG_FILE_LOCKING */
1042#define fcntl_getlk(a, b) ({ -EINVAL; })
1043#define fcntl_setlk(a, b, c, d) ({ -EACCES; })
1044#if BITS_PER_LONG == 32
1045#define fcntl_getlk64(a, b) ({ -EINVAL; })
1046#define fcntl_setlk64(a, b, c, d) ({ -EACCES; })
1047#endif
1048#define fcntl_setlease(a, b, c) ({ 0; })
1049#define fcntl_getlease(a) ({ 0; })
1050#define locks_init_lock(a) ({ })
1051#define __locks_copy_lock(a, b) ({ })
1052#define locks_copy_lock(a, b) ({ })
1053#define locks_remove_posix(a, b) ({ })
1054#define locks_remove_flock(a) ({ })
1055#define posix_test_lock(a, b) ({ 0; })
1056#define posix_lock_file(a, b, c) ({ -ENOLCK; })
1057#define posix_lock_file_wait(a, b) ({ -ENOLCK; })
1058#define posix_unblock_lock(a, b) (-ENOENT)
1059#define vfs_test_lock(a, b) ({ 0; })
1060#define vfs_lock_file(a, b, c, d) (-ENOLCK)
1061#define vfs_cancel_lock(a, b) ({ 0; })
1062#define flock_lock_file_wait(a, b) ({ -ENOLCK; })
1063#define __break_lease(a, b) ({ 0; })
1064#define lease_get_mtime(a, b) ({ })
1065#define generic_setlease(a, b, c) ({ -EINVAL; })
1066#define vfs_setlease(a, b, c) ({ -EINVAL; })
1067#define lease_modify(a, b) ({ -EINVAL; })
1068#define lock_may_read(a, b, c) ({ 1; })
1069#define lock_may_write(a, b, c) ({ 1; })
1070#endif /* !CONFIG_FILE_LOCKING */
1071
1031 1072
1032struct fasync_struct { 1073struct fasync_struct {
1033 int magic; 1074 int magic;
@@ -1575,9 +1616,12 @@ extern int vfs_statfs(struct dentry *, struct kstatfs *);
1575/* /sys/fs */ 1616/* /sys/fs */
1576extern struct kobject *fs_kobj; 1617extern struct kobject *fs_kobj;
1577 1618
1619extern int rw_verify_area(int, struct file *, loff_t *, size_t);
1620
1578#define FLOCK_VERIFY_READ 1 1621#define FLOCK_VERIFY_READ 1
1579#define FLOCK_VERIFY_WRITE 2 1622#define FLOCK_VERIFY_WRITE 2
1580 1623
1624#ifdef CONFIG_FILE_LOCKING
1581extern int locks_mandatory_locked(struct inode *); 1625extern int locks_mandatory_locked(struct inode *);
1582extern int locks_mandatory_area(int, struct inode *, struct file *, loff_t, size_t); 1626extern int locks_mandatory_area(int, struct inode *, struct file *, loff_t, size_t);
1583 1627
@@ -1608,8 +1652,6 @@ static inline int locks_verify_locked(struct inode *inode)
1608 return 0; 1652 return 0;
1609} 1653}
1610 1654
1611extern int rw_verify_area(int, struct file *, loff_t *, size_t);
1612
1613static inline int locks_verify_truncate(struct inode *inode, 1655static inline int locks_verify_truncate(struct inode *inode,
1614 struct file *filp, 1656 struct file *filp,
1615 loff_t size) 1657 loff_t size)
@@ -1630,6 +1672,15 @@ static inline int break_lease(struct inode *inode, unsigned int mode)
1630 return __break_lease(inode, mode); 1672 return __break_lease(inode, mode);
1631 return 0; 1673 return 0;
1632} 1674}
1675#else /* !CONFIG_FILE_LOCKING */
1676#define locks_mandatory_locked(a) ({ 0; })
1677#define locks_mandatory_area(a, b, c, d, e) ({ 0; })
1678#define __mandatory_lock(a) ({ 0; })
1679#define mandatory_lock(a) ({ 0; })
1680#define locks_verify_locked(a) ({ 0; })
1681#define locks_verify_truncate(a, b, c) ({ 0; })
1682#define break_lease(a, b) ({ 0; })
1683#endif /* CONFIG_FILE_LOCKING */
1633 1684
1634/* fs/open.c */ 1685/* fs/open.c */
1635 1686