The Samba-Bugzilla – Attachment 11484 Details for
Bug 11547
vfs_commit fails all file opens for "hinted" and "growth" eof modes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.3.next and 4.2.next
vfs-commit-4-3.patch (text/plain), 1.41 KB, created by
Uri Simchoni
on 2015-10-08 05:41:30 UTC
(
hide
)
Description:
git-am fix for 4.3.next and 4.2.next
Filename:
MIME Type:
Creator:
Uri Simchoni
Created:
2015-10-08 05:41:30 UTC
Size:
1.41 KB
patch
obsolete
>From d7069c60f185c88260ece247c8962e500bd692d2 Mon Sep 17 00:00:00 2001 >From: Uri Simchoni <uri@samba.org> >Date: Wed, 7 Oct 2015 22:44:11 +0300 >Subject: [PATCH] vfs_commit: set the fd on open before calling SMB_VFS_FSTAT > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=11547 > >Signed-off-by: Uri Simchoni <uri@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> > >Autobuild-User(master): Jeremy Allison <jra@samba.org> >Autobuild-Date(master): Thu Oct 8 02:56:41 CEST 2015 on sn-devel-104 > >(cherry picked from commit 5709dece4860f205e31309e31ec4e3e938d9f6a5) >--- > source3/modules/vfs_commit.c | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > >diff --git a/source3/modules/vfs_commit.c b/source3/modules/vfs_commit.c >index a6bc2a4..f1e2743 100644 >--- a/source3/modules/vfs_commit.c >+++ b/source3/modules/vfs_commit.c >@@ -230,7 +230,16 @@ static int commit_open( > /* EOF commit modes require us to know the initial file size. */ > if (c && (c->on_eof != EOF_NONE)) { > SMB_STRUCT_STAT st; >- if (SMB_VFS_FSTAT(fsp, &st) == -1) { >+ /* >+ * Setting the fd of the FSP is a hack >+ * but also practiced elsewhere - >+ * needed for calling the VFS. >+ */ >+ fsp->fh->fd = fd; >+ if (SMB_VFS_FSTAT(fsp, &st) == -1) { >+ int saved_errno = errno; >+ SMB_VFS_CLOSE(fsp); >+ errno = saved_errno; > return -1; > } > c->eof = st.st_ex_size; >-- >1.9.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
jra
:
review+
Actions:
View
Attachments on
bug 11547
: 11484