本文整理汇总了C++中ReleaseTokenFSCall函数的典型用法代码示例。如果您正苦于以下问题:C++ ReleaseTokenFSCall函数的具体用法?C++ ReleaseTokenFSCall怎么用?C++ ReleaseTokenFSCall使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ReleaseTokenFSCall函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GPFSFSAL_open
/**
* FSAL_open:
* Open a regular file for reading/writing its data content.
*
* \param filehandle (input):
* Handle of the file to be read/modified.
* \param cred (input):
* Authentication context for the operation (user,...).
* \param openflags (input):
* Flags that indicates behavior for file opening and access.
* This is an inclusive OR of the following values
* ( such of them are not compatible) :
* - FSAL_O_RDONLY: opening file for reading only.
* - FSAL_O_RDWR: opening file for reading and writing.
* - FSAL_O_WRONLY: opening file for writting only.
* - FSAL_O_APPEND: always write at the end of the file.
* - FSAL_O_TRUNC: truncate the file to 0 on opening.
* \param file_descriptor (output):
* The file descriptor to be used for FSAL_read/write operations.
* \param file_attributes (optionnal input/output):
* Post operation attributes.
* As input, it defines the attributes that the caller
* wants to retrieve (by positioning flags into this structure)
* and the output is built considering this input
* (it fills the structure according to the flags it contains).
*
* \return Major error codes:
* - ERR_FSAL_NO_ERROR: no error.
* - Another error code if an error occured during this call.
*/
fsal_status_t GPFSFSAL_open(fsal_handle_t * p_filehandle, /* IN */
fsal_op_context_t * p_context, /* IN */
fsal_openflags_t openflags, /* IN */
fsal_file_t * file_desc, /* OUT */
fsal_attrib_list_t * p_file_attributes /* [ IN/OUT ] */
)
{
int rc, errsv;
fsal_status_t status;
int fd;
int posix_flags = 0;
gpfsfsal_file_t * p_file_descriptor = (gpfsfsal_file_t *)file_desc;
/* sanity checks.
* note : file_attributes is optional.
*/
if(!p_filehandle || !p_context || !p_file_descriptor)
Return(ERR_FSAL_FAULT, 0, INDEX_FSAL_open);
/* convert fsal open flags to posix open flags */
rc = fsal2posix_openflags(openflags, &posix_flags);
/* flags conflicts. */
if(rc)
{
LogWarn(COMPONENT_FSAL, "Invalid/conflicting flags : %#X", openflags);
Return(rc, 0, INDEX_FSAL_open);
}
TakeTokenFSCall();
status = fsal_internal_handle2fd(p_context, p_filehandle, &fd, posix_flags);
ReleaseTokenFSCall();
if(FSAL_IS_ERROR(status))
ReturnStatus(status, INDEX_FSAL_open);
/* output attributes */
if(p_file_attributes)
{
p_file_attributes->asked_attributes = GPFS_SUPPORTED_ATTRIBUTES;
status = GPFSFSAL_getattrs(p_filehandle, p_context, p_file_attributes);
if(FSAL_IS_ERROR(status))
ReturnStatus(status, INDEX_FSAL_open);
}
TakeTokenFSCall();
p_file_descriptor->fd = fd;
errsv = errno;
ReleaseTokenFSCall();
/* set the read-only flag of the file descriptor */
p_file_descriptor->ro = openflags & FSAL_O_RDONLY;
Return(ERR_FSAL_NO_ERROR, 0, INDEX_FSAL_open);
}
示例2: xfsfsal_stat_by_name
/*
* Common code used by fsal_lookup and fsal_readdir -
* given the name try to stat an entry. If an entry is
* regular file or directory then open it and use fd2handle
* to get a real handle, otherwise use inum2handle to fake
* a handle.
*/
fsal_status_t
xfsfsal_stat_by_name(fsal_op_context_t * context,
int atfd,
const char *name,
fsal_handle_t *handle,
fsal_attrib_list_t * attributes)
{
int rc;
int errsv;
struct stat buffstat;
fsal_status_t st;
TakeTokenFSCall();
rc = fstatat(atfd, name, &buffstat, AT_SYMLINK_NOFOLLOW);
errsv = errno;
ReleaseTokenFSCall();
if(rc < 0)
ReturnCode(posix2fsal_error(errsv), errsv);
if(S_ISDIR(buffstat.st_mode) || S_ISREG(buffstat.st_mode))
{
int tmpfd;
TakeTokenFSCall();
tmpfd = openat(atfd, name, O_RDONLY | O_NOFOLLOW, 0600);
errsv = errno;
ReleaseTokenFSCall();
if(tmpfd < 0)
ReturnCode(posix2fsal_error(errsv), errsv);
st = fsal_internal_fd2handle(context, tmpfd, handle);
close(tmpfd);
}
else
{
st = fsal_internal_inum2handle(context, buffstat.st_ino, handle);
}
if(FSAL_IS_ERROR(st))
return st;
if(attributes)
{
st = posix2fsal_attributes(&buffstat, attributes);
if(FSAL_IS_ERROR(st))
{
FSAL_CLEAR_MASK(attributes->asked_attributes);
FSAL_SET_MASK(attributes->asked_attributes, FSAL_ATTR_RDATTR_ERR);
}
}
return st;
}
示例3: XFSFSAL_getattrs
/**
* FSAL_getattrs:
* Get attributes for the object specified by its filehandle.
*
* \param filehandle (input):
* The handle of the object to get parameters.
* \param cred (input):
* Authentication context for the operation (user,...).
* \param object_attributes (mandatory input/output):
* The retrieved attributes for the object.
* As input, it defines the attributes that the caller
* wants to retrieve (by positioning flags into this structure)
* and the output is built considering this input
* (it fills the structure according to the flags it contains).
*
* \return Major error codes :
* - ERR_FSAL_NO_ERROR (no error)
* - Another error code if an error occured.
*/
fsal_status_t XFSFSAL_getattrs(fsal_handle_t * p_filehandle, /* IN */
fsal_op_context_t * p_context, /* IN */
fsal_attrib_list_t * p_object_attributes /* IN/OUT */
)
{
int rc, errsv;
fsal_status_t st;
int fd;
struct stat buffstat;
/* sanity checks.
* note : object_attributes is mandatory in FSAL_getattrs.
*/
if(!p_filehandle || !p_context || !p_object_attributes)
Return(ERR_FSAL_FAULT, 0, INDEX_FSAL_getattrs);
TakeTokenFSCall();
st = fsal_internal_handle2fd(p_context, p_filehandle, &fd, O_RDONLY);
ReleaseTokenFSCall();
if(FSAL_IS_ERROR(st))
ReturnStatus(st, INDEX_FSAL_getattrs);
/* get file metadata */
TakeTokenFSCall();
rc = fstat(fd, &buffstat);
errsv = errno;
ReleaseTokenFSCall();
close(fd);
if(rc != 0)
{
if(errsv == ENOENT)
Return(ERR_FSAL_STALE, errsv, INDEX_FSAL_getattrs);
else
Return(posix2fsal_error(errsv), errsv, INDEX_FSAL_getattrs);
}
/* convert attributes */
st = posix2fsal_attributes(&buffstat, p_object_attributes);
if(FSAL_IS_ERROR(st))
{
FSAL_CLEAR_MASK(p_object_attributes->asked_attributes);
FSAL_SET_MASK(p_object_attributes->asked_attributes, FSAL_ATTR_RDATTR_ERR);
ReturnStatus(st, INDEX_FSAL_getattrs);
}
Return(ERR_FSAL_NO_ERROR, 0, INDEX_FSAL_getattrs);
}
示例4: XFSFSAL_sync
/**
* FSAL_sync:
* This function is used for processing stable writes and COMMIT requests.
* Calling this function makes sure the changes to a specific file are
* written to disk rather than kept in memory.
*
* \param file_descriptor (input):
* The file descriptor returned by FSAL_open.
*
* \return Major error codes:
* - ERR_FSAL_NO_ERROR: no error.
* - Another error code if an error occured during this call.
*/
fsal_status_t XFSFSAL_sync(xfsfsal_file_t * p_file_descriptor /* IN */)
{
int rc, errsv;
/* sanity checks. */
if(!p_file_descriptor)
Return(ERR_FSAL_FAULT, 0, INDEX_FSAL_sync);
if( p_file_descriptor->fd == 0 )
Return(ERR_FSAL_NO_ERROR, 0, INDEX_FSAL_sync); /* Nothing to sync, the file is not opened */
/* Flush data. */
TakeTokenFSCall();
rc = fsync(p_file_descriptor->fd);
errsv = errno;
ReleaseTokenFSCall();
if(rc)
{
LogEvent(COMPONENT_FSAL, "Error in fsync operation");
Return(posix2fsal_error(errsv), errsv, INDEX_FSAL_sync);
}
Return(ERR_FSAL_NO_ERROR, 0, INDEX_FSAL_sync);
}
示例5: POSIXFSAL_close
fsal_status_t POSIXFSAL_close(fsal_file_t * file_descriptor, /* IN */
fsal_op_context_t * p_context /* IN */
)
{
posixfsal_file_t * p_file_descriptor = (posixfsal_file_t *) file_descriptor;
int rc, errsv;
/* sanity checks. */
if(!p_file_descriptor)
Return(ERR_FSAL_FAULT, 0, INDEX_FSAL_close);
/* call to close */
TakeTokenFSCall();
#ifdef _FSAL_POSIX_USE_STREAM
rc = fclose(p_file_descriptor->p_file);
#else
rc = close(p_file_descriptor->filefd);
#endif
errsv = errno;
ReleaseTokenFSCall();
if(rc)
Return(posix2fsal_error(errsv), errsv, INDEX_FSAL_close);
Return(ERR_FSAL_NO_ERROR, 0, INDEX_FSAL_close);
}
示例6: GPFSFSAL_close
fsal_status_t GPFSFSAL_close(fsal_file_t * p_file_descriptor /* IN */
)
{
int rc, errsv;
/* sanity checks. */
if(!p_file_descriptor)
Return(ERR_FSAL_FAULT, 0, INDEX_FSAL_close);
/* call to close */
TakeTokenFSCall();
rc = close(((gpfsfsal_file_t *)p_file_descriptor)->fd);
errsv = errno;
ReleaseTokenFSCall();
if(rc)
Return(posix2fsal_error(errsv), errsv, INDEX_FSAL_close);
Return(ERR_FSAL_NO_ERROR, 0, INDEX_FSAL_close);
}
示例7: GPFSFSAL_dynamic_fsinfo
/**
* FSAL_dynamic_fsinfo:
* Return dynamic filesystem info such as
* used size, free size, number of objects...
*
* \param filehandle (input):
* Handle of an object in the filesystem
* whom info is to be retrieved.
* \param cred (input):
* Authentication context for the operation (user,...).
* \param dynamicinfo (output):
* Pointer to the static info of the filesystem.
*
* \return Major error codes:
* - ERR_FSAL_NO_ERROR: no error.
* - ERR_FSAL_FAULT: NULL pointer passed as input parameter.
* - ERR_FSAL_SERVERFAULT: Unexpected error.
*/
fsal_status_t GPFSFSAL_dynamic_fsinfo(gpfsfsal_handle_t * p_filehandle, /* IN */
gpfsfsal_op_context_t * p_context, /* IN */
fsal_dynamicfsinfo_t * p_dynamicinfo /* OUT */
)
{
fsal_path_t pathfsal;
fsal_status_t status;
struct statvfs buffstatvfs;
int rc, errsv;
/* sanity checks. */
if(!p_filehandle || !p_dynamicinfo || !p_context)
Return(ERR_FSAL_FAULT, 0, INDEX_FSAL_dynamic_fsinfo);
TakeTokenFSCall();
rc = fstatvfs(p_context->export_context->mount_root_fd, &buffstatvfs);
errsv = errno;
ReleaseTokenFSCall();
if(rc)
Return(posix2fsal_error(errsv), errsv, INDEX_FSAL_dynamic_fsinfo);
p_dynamicinfo->total_bytes = buffstatvfs.f_frsize * buffstatvfs.f_blocks;
p_dynamicinfo->free_bytes = buffstatvfs.f_frsize * buffstatvfs.f_bfree;
p_dynamicinfo->avail_bytes = buffstatvfs.f_frsize * buffstatvfs.f_bavail;
p_dynamicinfo->total_files = buffstatvfs.f_files;
p_dynamicinfo->free_files = buffstatvfs.f_ffree;
p_dynamicinfo->avail_files = buffstatvfs.f_favail;
p_dynamicinfo->time_delta.seconds = 1;
p_dynamicinfo->time_delta.nseconds = 0;
Return(ERR_FSAL_NO_ERROR, 0, INDEX_FSAL_dynamic_fsinfo);
}
示例8: xattr_name_to_id
/**
* return index if found,
* negative value on error.
*/
static int xattr_name_to_id(libzfswrap_vfs_t *p_vfs, zfsfsal_op_context_t *p_context, zfsfsal_handle_t *p_objecthandle, const char *psz_name, unsigned int *p_id)
{
unsigned int i;
char *psz_buffer, *ptr;
size_t i_size;
creden_t cred;
cred.uid = p_context->credential.user;
cred.gid = p_context->credential.group;
/* get xattrs */
TakeTokenFSCall();
int rc = libzfswrap_listxattr(p_vfs, &cred,
p_objecthandle->data.zfs_handle, &psz_buffer, &i_size);
ReleaseTokenFSCall();
if(rc)
return posix2fsal_error(rc);
for(ptr = psz_buffer, i = 0; ptr < psz_buffer + i_size; i++, ptr += strlen(ptr) + 1)
{
if(!strcmp(psz_name, ptr))
{
*p_id = i + XATTR_COUNT;
free(psz_buffer);
return ERR_FSAL_NO_ERROR;
}
}
free(psz_buffer);
return ERR_FSAL_NOENT;
}
示例9: ZFSFSAL_SetXAttrValue
fsal_status_t ZFSFSAL_SetXAttrValue(fsal_handle_t * obj_handle, /* IN */
const fsal_name_t * xattr_name, /* IN */
fsal_op_context_t * p_context, /* IN */
caddr_t buffer_addr, /* IN */
size_t buffer_size, /* IN */
int create /* IN */
)
{
//@TODO: use the create parameter ?
int rc;
creden_t cred;
zfsfsal_handle_t * p_objecthandle = (zfsfsal_handle_t *)obj_handle;
/* Hook to prevent any modification in the snapshots */
if(p_objecthandle->data.i_snap != 0)
Return(ERR_FSAL_ROFS, 0, INDEX_FSAL_SetXAttrValue);
/* Remove trailing '\n', if any */
chomp_attr_value((char*)buffer_addr, buffer_size);
cred.uid = p_context->credential.user;
cred.gid = p_context->credential.group;
TakeTokenFSCall();
rc = libzfswrap_setxattr(((zfsfsal_op_context_t *)p_context)->export_context->p_vfs, &cred,
p_objecthandle->data.zfs_handle, xattr_name->name, (char*)buffer_addr);
ReleaseTokenFSCall();
if(rc)
Return(posix2fsal_error(rc), 0, INDEX_FSAL_SetXAttrValue);
Return(ERR_FSAL_NO_ERROR, 0, INDEX_FSAL_SetXAttrValue);
}
示例10: POSIXFSAL_commit
/**
* FSAL_commit:
* This function is used for processing stable writes and COMMIT requests.
* Calling this function makes sure the changes to a specific file are
* written to disk rather than kept in memory.
*
* \param file_descriptor (input):
* The file descriptor returned by FSAL_open.
* \param offset:
* The starting offset for the portion of file to be synced
* \param length:
* The length for the portion of file to be synced.
*
* \return Major error codes:
* - ERR_FSAL_NO_ERROR: no error.
* - Another error code if an error occured during this call.
*/
fsal_status_t POSIXFSAL_commit(fsal_file_t * file_descriptor,
fsal_op_context_t * p_context, /* IN */
fsal_off_t offset,
fsal_size_t length )
{
posixfsal_file_t * p_file_descriptor = (posixfsal_file_t *) file_descriptor;
int rc, errsv;
/* sanity checks. */
if(!p_file_descriptor)
Return(ERR_FSAL_FAULT, 0, INDEX_FSAL_commit);
/* Flush data. */
TakeTokenFSCall();
rc = fsync(p_file_descriptor->filefd);
errsv = errno;
ReleaseTokenFSCall();
if(rc)
{
LogEvent(COMPONENT_FSAL, "Error in fsync operation");
Return(posix2fsal_error(errsv), errsv, INDEX_FSAL_commit);
}
Return(ERR_FSAL_NO_ERROR, 0, INDEX_FSAL_commit);
}
示例11: XFSFSAL_commit
/**
* FSAL_commit:
* This function is used for processing stable writes and COMMIT requests.
* Calling this function makes sure the changes to a specific file are
* written to disk rather than kept in memory.
*
* \param file_descriptor (input):
* The file descriptor returned by FSAL_open.
* \param offset:
* The starting offset for the portion of file to be synced
* \param length:
* The length for the portion of file to be synced.
*
* \return Major error codes:
* - ERR_FSAL_NO_ERROR: no error.
* - Another error code if an error occured during this call.
*/
fsal_status_t XFSFSAL_commit( fsal_file_t * p_file_descriptor,
fsal_op_context_t * p_context, /* IN */
fsal_off_t offset,
fsal_size_t length )
{
int rc, errsv;
/* sanity checks. */
if(!p_file_descriptor)
Return(ERR_FSAL_FAULT, 0, INDEX_FSAL_commit);
if(((xfsfsal_file_t *)p_file_descriptor)->fd == 0 )
Return(ERR_FSAL_NO_ERROR, 0, INDEX_FSAL_commit); /* Nothing to sync, the file is not opened */
/* Flush data. */
TakeTokenFSCall();
rc = fsync(((xfsfsal_file_t *)p_file_descriptor)->fd);
errsv = errno;
ReleaseTokenFSCall();
if(rc)
{
LogEvent(COMPONENT_FSAL, "Error in fsync operation");
Return(posix2fsal_error(errsv), errsv, INDEX_FSAL_commit);
}
Return(ERR_FSAL_NO_ERROR, 0, INDEX_FSAL_commit);
}
示例12: ZFSFSAL_mkdir
/**
* FSAL_mkdir:
* Create a directory.
*
* \param parent_directory_handle (input):
* Handle of the parent directory where
* the subdirectory is to be created.
* \param p_dirname (input):
* Pointer to the name of the directory to be created.
* \param cred (input):
* Authentication context for the operation (user,...).
* \param accessmode (input):
* Mode for the directory to be created.
* (the umask defined into the FSAL configuration file
* will be applied on it).
* \param object_handle (output):
* Pointer to the handle of the created directory.
* \param object_attributes (optionnal input/output):
* The attributes of the created directory.
* As input, it defines the attributes that the caller
* wants to retrieve (by positioning flags into this structure)
* and the output is built considering this input
* (it fills the structure according to the flags it contains).
* May be NULL.
*
* \return Major error codes :
* - ERR_FSAL_NO_ERROR (no error)
* - ERR_FSAL_STALE (parent_directory_handle does not address an existing object)
* - ERR_FSAL_FAULT (a NULL pointer was passed as mandatory argument)
* - Other error codes can be returned :
* ERR_FSAL_ACCESS, ERR_FSAL_EXIST, ERR_FSAL_IO, ...
*
* NB: if getting postop attributes failed,
* the function does not return an error
* but the FSAL_ATTR_RDATTR_ERR bit is set in
* the object_attributes->asked_attributes field.
*/
fsal_status_t ZFSFSAL_mkdir(zfsfsal_handle_t * parent_directory_handle, /* IN */
fsal_name_t * p_dirname, /* IN */
zfsfsal_op_context_t * p_context, /* IN */
fsal_accessmode_t accessmode, /* IN */
zfsfsal_handle_t * object_handle, /* OUT */
fsal_attrib_list_t * object_attributes /* [ IN/OUT ] */
)
{
int rc;
mode_t unix_mode;
/* sanity checks.
* note : object_attributes is optional.
*/
if(!parent_directory_handle || !p_context || !object_handle || !p_dirname)
Return(ERR_FSAL_FAULT, 0, INDEX_FSAL_mkdir);
/* convert fsal args to ZFS args */
unix_mode = fsal2unix_mode(accessmode);
/* Applying FSAL umask */
unix_mode = unix_mode & ~global_fs_info.umask;
TakeTokenFSCall();
/* Create the directory */
inogen_t object;
rc = libzfswrap_mkdir(p_context->export_context->p_vfs, &p_context->user_credential.cred,
parent_directory_handle->data.zfs_handle, p_dirname->name, unix_mode, &object);
ReleaseTokenFSCall();
/* >> interpret returned error << */
if(rc)
Return(posix2fsal_error(rc), 0, INDEX_FSAL_create);
/* set output handle */
object_handle->data.zfs_handle = object;
object_handle->data.type = FSAL_TYPE_DIR;
if(object_attributes)
{
/**@TODO: skip this => libzfswrap_mkdir might return attributes */
fsal_status_t status = ZFSFSAL_getattrs(object_handle, p_context, object_attributes);
/* on error, we set a special bit in the mask. */
if(FSAL_IS_ERROR(status))
{
FSAL_CLEAR_MASK(object_attributes->asked_attributes);
FSAL_SET_MASK(object_attributes->asked_attributes, FSAL_ATTR_RDATTR_ERR);
}
}
/* OK */
Return(ERR_FSAL_NO_ERROR, 0, INDEX_FSAL_mkdir);
}
示例13: ZFSFSAL_RemoveXAttrById
/**
* Removes a xattr by Id
*
* \param p_objecthandle Handle of the object you want to get attribute for.
* \param p_context pointer to the current security context.
* \param xattr_id xattr's id
*/
fsal_status_t ZFSFSAL_RemoveXAttrById(fsal_handle_t * obj_handle, /* IN */
fsal_op_context_t * context, /* IN */
unsigned int xattr_id) /* IN */
{
int rc;
creden_t cred;
char psz_name[FSAL_MAX_NAME_LEN];
zfsfsal_handle_t * p_objecthandle = (zfsfsal_handle_t *)obj_handle;
zfsfsal_op_context_t *p_context = (zfsfsal_op_context_t *)context;
/* Hook to prevent any modification in the snapshots */
if(p_objecthandle->data.i_snap != 0)
Return(ERR_FSAL_ROFS, 0, INDEX_FSAL_SetXAttrValue);
if((rc = xattr_id_to_name(p_context->export_context->p_vfs, p_context, p_objecthandle,
xattr_id, psz_name)))
Return(rc, 0, INDEX_FSAL_SetXAttrValue);
cred.uid = p_context->credential.user;
cred.gid = p_context->credential.group;
TakeTokenFSCall();
rc = libzfswrap_removexattr(p_context->export_context->p_vfs, &cred,
p_objecthandle->data.zfs_handle, psz_name);
ReleaseTokenFSCall();
if(rc)
Return(posix2fsal_error(rc), 0, INDEX_FSAL_SetXAttrValue);
Return(ERR_FSAL_NO_ERROR, 0, INDEX_FSAL_SetXAttrValue);
}
示例14: dpmfsal_closedir
/*
* Free the resources allocated for reading directory entries.
*
* \param dir_descriptor (input):
* Pointer to a directory descriptor filled by FSAL_opendir.
*
* \return Major error codes :
* - ERR_FSAL_NO_ERROR (no error)
* - ERR_FSAL_FAULT (a NULL pointer was passed as mandatory argument)
* - Other error codes can be returned :
* ERR_FSAL_IO, ...
*/
fsal_status_t dpmfsal_closedir(fsal_dir_t * dir_descriptor // IN
)
{
int rc;
// Sanity checks
if (!dir_descriptor)
Return(ERR_FSAL_FAULT, 0, INDEX_FSAL_closedir);
LogInfo(COMPONENT_FSAL, "dpmfsal_closedir: start");
TakeTokenFSCall();
rc = dpns_closedir(dir_descriptor->p_dir);
ReleaseTokenFSCall();
if (rc)
Return(dpns2fsal_error(serrno), serrno, INDEX_FSAL_opendir);
if (dpns_endsess() < 0)
Return(ERR_FSAL_FAULT, 0, INDEX_FSAL_closedir);
// Fill the descriptor with 0s
memset(dir_descriptor, 0, sizeof(fsal_dir_t));
Return(ERR_FSAL_NO_ERROR, 0, INDEX_FSAL_closedir);
}
示例15: ZFSFSAL_close
fsal_status_t ZFSFSAL_close(zfsfsal_file_t * file_descriptor /* IN */
)
{
int rc = 0;
/* sanity checks. */
if(!file_descriptor)
Return(ERR_FSAL_FAULT, 0, INDEX_FSAL_close);
TakeTokenFSCall();
if(!file_descriptor->is_closed)
{
rc = libzfswrap_close(file_descriptor->p_vfs, &file_descriptor->cred,
file_descriptor->p_vnode, file_descriptor->flags);
file_descriptor->is_closed = 1;
}
ReleaseTokenFSCall();
if(rc)
Return(posix2fsal_error(rc), rc, INDEX_FSAL_close);
Return(ERR_FSAL_NO_ERROR, 0, INDEX_FSAL_close);
}