From 3715d69037c2a53bdcc1dbdf4d4cb0b1254e9938 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Wed, 29 Apr 2015 20:48:08 +0200 Subject: [PATCH 1/2] vfp_gpfs: ensure END_PROFILE is always called MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: https://bugzilla.samba.org/show_bug.cgi?id=11244 Signed-off-by: Ralph Boehme Reviewed-by: Christof Schmitt Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Thu Apr 30 19:34:41 CEST 2015 on sn-devel-104 (cherry picked from commit 5e65ae14ddb74c648f31b4dfbacd4af9c02ca058) --- source3/modules/vfs_gpfs.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 2efac19..baf39b0 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -115,8 +115,12 @@ static int vfs_gpfs_setlease(vfs_handle_struct *handle, files_struct *fsp, struct gpfs_config_data, return -1); - if (linux_set_lease_sighandler(fsp->fh->fd) == -1) - return -1; + START_PROFILE(syscall_linux_setlease); + + if (linux_set_lease_sighandler(fsp->fh->fd) == -1) { + ret = -1; + goto failure; + } START_PROFILE(syscall_linux_setlease); @@ -132,6 +136,7 @@ static int vfs_gpfs_setlease(vfs_handle_struct *handle, files_struct *fsp, END_PROFILE(syscall_linux_setlease); +failure: return ret; } -- 2.1.0 From eabf2d8ed5989698b9f066e804cf5f0451323d88 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Thu, 30 Apr 2015 12:29:57 +0200 Subject: [PATCH 2/2] vfs_gpfs: move failure label before END_PROFILE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The label was added in 5e65ae14ddb74c648f31b4dfbacd4af9c02ca058 as part of fix for bug 11244, but was wrongly placed behind END_PROFILE. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11244 Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Thu May 7 19:22:00 CEST 2015 on sn-devel-104 (cherry picked from commit 3876e59826ad17466975ae9e9a65879c76737b2b) --- source3/modules/vfs_gpfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index baf39b0..11e6506 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -134,9 +134,9 @@ static int vfs_gpfs_setlease(vfs_handle_struct *handle, files_struct *fsp, unbecome_root(); } +failure: END_PROFILE(syscall_linux_setlease); -failure: return ret; } -- 2.1.0