Changeset 599 for trunk/server/source3/modules/vfs_gpfs.c
- Timestamp:
- Jul 6, 2011, 8:21:13 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/server/source3/modules/vfs_gpfs.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/source3/modules/vfs_gpfs.c
r596 r599 31 31 #include "vfs_gpfs.h" 32 32 33 34 35 36 37 38 33 39 static int vfs_gpfs_kernel_flock(vfs_handle_struct *handle, files_struct *fsp, 34 40 uint32 share_mode, uint32 access_mask) 35 41 { 36 42 43 44 45 46 47 48 37 49 START_PROFILE(syscall_kernel_flock); 38 50 39 51 kernel_flock(fsp->fh->fd, share_mode, access_mask); 40 52 41 if (!set_gpfs_sharemode(fsp, access_mask, fsp->share_access)) { 42 43 return -1; 44 53 if (config->sharemodes 54 && !set_gpfs_sharemode(fsp, access_mask, fsp->share_access)) { 55 return -1; 45 56 } 46 57 … … 52 63 static int vfs_gpfs_close(vfs_handle_struct *handle, files_struct *fsp) 53 64 { 54 if ((fsp->fh != NULL) && (fsp->fh->fd != -1)) { 65 66 struct gpfs_config_data *config; 67 68 SMB_VFS_HANDLE_GET_DATA(handle, config, 69 struct gpfs_config_data, 70 return -1); 71 72 if (config->sharemodes && (fsp->fh != NULL) && (fsp->fh->fd != -1)) { 55 73 set_gpfs_sharemode(fsp, 0, 0); 56 74 } … … 62 80 int leasetype) 63 81 { 64 int ret; 82 struct gpfs_config_data *config; 83 int ret=0; 84 85 SMB_VFS_HANDLE_GET_DATA(handle, config, 86 struct gpfs_config_data, 87 return -1); 65 88 66 89 START_PROFILE(syscall_linux_setlease); 67 90 68 if ( linux_set_lease_sighandler(fsp->fh->fd) == -1) 69 return -1; 70 71 ret = set_gpfs_lease(fsp->fh->fd,leasetype); 72 73 if ( ret < 0 ) { 91 if (linux_set_lease_sighandler(fsp->fh->fd) == -1) 92 return -1; 93 94 if (config->leases) { 95 ret = set_gpfs_lease(fsp->fh->fd,leasetype); 96 } 97 98 if (ret < 0) { 74 99 /* This must have come from GPFS not being available */ 75 100 /* or some other error, hence call the default */ … … 959 984 struct gpfs_winattr attrs; 960 985 int ret = 0; 986 961 987 962 988 DEBUG(10, ("gpfs_get_xattr: %s \n",path)); … … 995 1021 } 996 1022 997 snprintf(attrstr, size, "0x%x", dosmode & SAMBA_ATTRIBUTES_MASK); 1023 result = snprintf(attrstr, size, "0x%x", 1024 dosmode & SAMBA_ATTRIBUTES_MASK) + 1; 1025 998 1026 DEBUG(10, ("gpfs_get_xattr: returning %s\n",attrstr)); 999 return size;1027 return ; 1000 1028 } 1001 1029 … … 1114 1142 } 1115 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1116 1187 static struct vfs_fn_pointers vfs_gpfs_fns = { 1188 1117 1189 .kernel_flock = vfs_gpfs_kernel_flock, 1118 1190 .linux_setlease = vfs_gpfs_setlease, … … 1135 1207 .lstat = vfs_gpfs_lstat, 1136 1208 .ntimes = vfs_gpfs_ntimes, 1209 1137 1210 }; 1138 1211
Note:
See TracChangeset
for help on using the changeset viewer.
