Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
nfsfh.c File Reference
#include <linux/exportfs.h>
#include <linux/sunrpc/svcauth_gss.h>
#include "nfsd.h"
#include "vfs.h"
#include "auth.h"

Go to the source code of this file.

Macros

#define NFSDDBG_FACILITY   NFSDDBG_FH
 

Functions

__be32 fh_verify (struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type, int access)
 
__be32 fh_compose (struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry, struct svc_fh *ref_fh)
 
__be32 fh_update (struct svc_fh *fhp)
 
void fh_put (struct svc_fh *fhp)
 
charSVCFH_fmt (struct svc_fh *fhp)
 
enum fsid_source fsid_source (struct svc_fh *fhp)
 

Macro Definition Documentation

#define NFSDDBG_FACILITY   NFSDDBG_FH

Definition at line 17 of file nfsfh.c.

Function Documentation

__be32 fh_compose ( struct svc_fh fhp,
struct svc_export exp,
struct dentry dentry,
struct svc_fh ref_fh 
)

Definition at line 505 of file nfsfh.c.

void fh_put ( struct svc_fh fhp)

Definition at line 625 of file nfsfh.c.

__be32 fh_update ( struct svc_fh fhp)

Definition at line 589 of file nfsfh.c.

__be32 fh_verify ( struct svc_rqst rqstp,
struct svc_fh fhp,
umode_t  type,
int  access 
)

fh_verify - filehandle lookup and access checking : pointer to current rpc request : filehandle to be verified : expected type of object pointed to by filehandle : type of access needed to object

Look up a dentry from the on-the-wire filehandle, check the client's access to the export, and set the current task's credentials.

Regardless of success or failure of fh_verify(), fh_put() should be called on when the caller is finished with the filehandle.

fh_verify() may be called multiple times on a given filehandle, for example, when processing an NFSv4 compound. The first call will look up a dentry using the on-the-wire filehandle. Subsequent calls will skip the lookup and just perform the other checks and possibly change the current task's credentials.

specifies the type of object expected using one of the S_IF* constants defined in include/linux/stat.h. The caller may use zero to indicate that it doesn't care, or a negative integer to indicate that it expects something not of the given type.

is formed from the NFSD_MAY_* constants defined in include/linux/nfsd/nfsd.h.

Definition at line 296 of file nfsfh.c.

Definition at line 665 of file nfsfh.c.

char* SVCFH_fmt ( struct svc_fh fhp)

Definition at line 649 of file nfsfh.c.