1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

pvfs_open: pass O_NONBLOCK to open() so that we'll not block with kernel oplocks

metze
(This used to be commit eeb0b8c349)
This commit is contained in:
Stefan Metzmacher 2008-03-10 12:48:02 +01:00
parent 49c86b73bf
commit 454e9bed04

View File

@ -600,7 +600,7 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs,
mode = pvfs_fileperms(pvfs, attrib);
/* create the file */
fd = open(name->full_name, flags | O_CREAT | O_EXCL, mode);
fd = open(name->full_name, flags | O_CREAT | O_EXCL| O_NONBLOCK, mode);
if (fd == -1) {
return pvfs_map_errno(pvfs, errno);
}
@ -1303,7 +1303,7 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs,
}
/* do the actual open */
fd = open(f->handle->name->full_name, flags);
fd = open(f->handle->name->full_name, flags | O_NONBLOCK);
if (fd == -1) {
talloc_free(lck);
return pvfs_map_errno(f->pvfs, errno);