static int vfswrap_linux_setlease(vfs_handle_struct *handle, files_struct *fsp, int fd, int leasetype) { int result = -1; START_PROFILE(syscall_linux_setlease); #ifdef HAVE_KERNEL_OPLOCKS_LINUX /* first set the signal handler */ if(linux_set_lease_sighandler(fd) == -1) { return -1; } result = linux_setlease(fd, leasetype); #else errno = ENOSYS; #endif END_PROFILE(syscall_linux_setlease); return result; }
static int vfs_gpfs_setlease(vfs_handle_struct *handle, files_struct *fsp, int leasetype) { int ret; START_PROFILE(syscall_linux_setlease); if ( linux_set_lease_sighandler(fsp->fh->fd) == -1) return -1; ret = set_gpfs_lease(fsp->fh->fd,leasetype); if ( ret < 0 ) { /* This must have come from GPFS not being available */ /* or some other error, hence call the default */ ret = linux_setlease(fsp->fh->fd, leasetype); } END_PROFILE(syscall_linux_setlease); return ret; }