summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-03-10 12:48:02 +0100
committerStefan Metzmacher <metze@samba.org>2008-03-12 17:35:06 +0100
commit454e9bed04011bcb184f20c2dd82f37255403227 (patch)
tree430140d4735b3344ccf7c1bdb0c114ddb5f71b71 /source4
parent49c86b73bf1babf151835d4afdbfb132f2e2c34e (diff)
downloadsamba-454e9bed04011bcb184f20c2dd82f37255403227.tar.gz
samba-454e9bed04011bcb184f20c2dd82f37255403227.tar.bz2
samba-454e9bed04011bcb184f20c2dd82f37255403227.zip
pvfs_open: pass O_NONBLOCK to open() so that we'll not block with kernel oplocks
metze (This used to be commit eeb0b8c349552517b521f1b8d7d9341e0ef630f2)
Diffstat (limited to 'source4')
-rw-r--r--source4/ntvfs/posix/pvfs_open.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c
index ceda3a6da0..8a949daa87 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -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);