diff options
Diffstat (limited to 'fs/cifs/cifsproto.h')
| -rw-r--r-- | fs/cifs/cifsproto.h | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index 39e47f46dea5..fb1657e0fdb8 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h | |||
| @@ -39,8 +39,20 @@ extern int smb_send(struct TCP_Server_Info *, struct smb_hdr *, | |||
| 39 | unsigned int /* length */); | 39 | unsigned int /* length */); |
| 40 | extern unsigned int _GetXid(void); | 40 | extern unsigned int _GetXid(void); |
| 41 | extern void _FreeXid(unsigned int); | 41 | extern void _FreeXid(unsigned int); |
| 42 | #define GetXid() (int)_GetXid(); cFYI(1,("CIFS VFS: in %s as Xid: %d with uid: %d",__func__, xid,current_fsuid())); | 42 | #define GetXid() \ |
| 43 | #define FreeXid(curr_xid) {_FreeXid(curr_xid); cFYI(1,("CIFS VFS: leaving %s (xid = %d) rc = %d",__func__,curr_xid,(int)rc));} | 43 | ({ \ |
| 44 | int __xid = (int)_GetXid(); \ | ||
| 45 | cFYI(1, "CIFS VFS: in %s as Xid: %d with uid: %d", \ | ||
| 46 | __func__, __xid, current_fsuid()); \ | ||
| 47 | __xid; \ | ||
| 48 | }) | ||
| 49 | |||
| 50 | #define FreeXid(curr_xid) \ | ||
| 51 | do { \ | ||
| 52 | _FreeXid(curr_xid); \ | ||
| 53 | cFYI(1, "CIFS VFS: leaving %s (xid = %d) rc = %d", \ | ||
| 54 | __func__, curr_xid, (int)rc); \ | ||
| 55 | } while (0) | ||
| 44 | extern char *build_path_from_dentry(struct dentry *); | 56 | extern char *build_path_from_dentry(struct dentry *); |
| 45 | extern char *cifs_build_path_to_root(struct cifs_sb_info *cifs_sb); | 57 | extern char *cifs_build_path_to_root(struct cifs_sb_info *cifs_sb); |
| 46 | extern char *build_wildcard_path_from_dentry(struct dentry *direntry); | 58 | extern char *build_wildcard_path_from_dentry(struct dentry *direntry); |
| @@ -73,7 +85,7 @@ extern struct cifsFileInfo *find_readable_file(struct cifsInodeInfo *); | |||
| 73 | extern unsigned int smbCalcSize(struct smb_hdr *ptr); | 85 | extern unsigned int smbCalcSize(struct smb_hdr *ptr); |
| 74 | extern unsigned int smbCalcSize_LE(struct smb_hdr *ptr); | 86 | extern unsigned int smbCalcSize_LE(struct smb_hdr *ptr); |
| 75 | extern int decode_negTokenInit(unsigned char *security_blob, int length, | 87 | extern int decode_negTokenInit(unsigned char *security_blob, int length, |
| 76 | enum securityEnum *secType); | 88 | struct TCP_Server_Info *server); |
| 77 | extern int cifs_convert_address(char *src, void *dst); | 89 | extern int cifs_convert_address(char *src, void *dst); |
| 78 | extern int map_smb_to_linux_error(struct smb_hdr *smb, int logErr); | 90 | extern int map_smb_to_linux_error(struct smb_hdr *smb, int logErr); |
| 79 | extern void header_assemble(struct smb_hdr *, char /* command */ , | 91 | extern void header_assemble(struct smb_hdr *, char /* command */ , |
| @@ -83,7 +95,6 @@ extern int small_smb_init_no_tc(const int smb_cmd, const int wct, | |||
| 83 | struct cifsSesInfo *ses, | 95 | struct cifsSesInfo *ses, |
| 84 | void **request_buf); | 96 | void **request_buf); |
| 85 | extern int CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, | 97 | extern int CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, |
| 86 | const int stage, | ||
| 87 | const struct nls_table *nls_cp); | 98 | const struct nls_table *nls_cp); |
| 88 | extern __u16 GetNextMid(struct TCP_Server_Info *server); | 99 | extern __u16 GetNextMid(struct TCP_Server_Info *server); |
| 89 | extern struct timespec cifs_NTtimeToUnix(__le64 utc_nanoseconds_since_1601); | 100 | extern struct timespec cifs_NTtimeToUnix(__le64 utc_nanoseconds_since_1601); |
| @@ -95,8 +106,11 @@ extern struct cifsFileInfo *cifs_new_fileinfo(struct inode *newinode, | |||
| 95 | __u16 fileHandle, struct file *file, | 106 | __u16 fileHandle, struct file *file, |
| 96 | struct vfsmount *mnt, unsigned int oflags); | 107 | struct vfsmount *mnt, unsigned int oflags); |
| 97 | extern int cifs_posix_open(char *full_path, struct inode **pinode, | 108 | extern int cifs_posix_open(char *full_path, struct inode **pinode, |
| 98 | struct vfsmount *mnt, int mode, int oflags, | 109 | struct vfsmount *mnt, |
| 99 | __u32 *poplock, __u16 *pnetfid, int xid); | 110 | struct super_block *sb, |
| 111 | int mode, int oflags, | ||
| 112 | __u32 *poplock, __u16 *pnetfid, int xid); | ||
| 113 | void cifs_fill_uniqueid(struct super_block *sb, struct cifs_fattr *fattr); | ||
| 100 | extern void cifs_unix_basic_to_fattr(struct cifs_fattr *fattr, | 114 | extern void cifs_unix_basic_to_fattr(struct cifs_fattr *fattr, |
| 101 | FILE_UNIX_BASIC_INFO *info, | 115 | FILE_UNIX_BASIC_INFO *info, |
| 102 | struct cifs_sb_info *cifs_sb); | 116 | struct cifs_sb_info *cifs_sb); |
| @@ -125,7 +139,9 @@ extern void cifs_dfs_release_automount_timer(void); | |||
| 125 | void cifs_proc_init(void); | 139 | void cifs_proc_init(void); |
| 126 | void cifs_proc_clean(void); | 140 | void cifs_proc_clean(void); |
| 127 | 141 | ||
| 128 | extern int cifs_setup_session(unsigned int xid, struct cifsSesInfo *pSesInfo, | 142 | extern int cifs_negotiate_protocol(unsigned int xid, |
| 143 | struct cifsSesInfo *ses); | ||
| 144 | extern int cifs_setup_session(unsigned int xid, struct cifsSesInfo *ses, | ||
| 129 | struct nls_table *nls_info); | 145 | struct nls_table *nls_info); |
| 130 | extern int CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses); | 146 | extern int CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses); |
| 131 | 147 | ||
