[PATCH] vfs_gpfs: Fix the build with profiling-data

Volker Lendecke Volker.Lendecke at SerNet.DE
Sat Sep 13 11:28:20 MDT 2014


Hi!

Review & push would be appreciated.

Thanks,

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 8e47e28e6be0d15bb360ede3d29bf3f9d5577886 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Fri, 12 Sep 2014 13:03:52 +0200
Subject: [PATCH] vfs_gpfs: Fix the build with profiling-data

This fails with -Werror=declaration-after-statement

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 source3/modules/vfs_gpfs.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index e722a86..6ead65b 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -78,6 +78,8 @@ static int vfs_gpfs_kernel_flock(vfs_handle_struct *handle, files_struct *fsp,
 	struct gpfs_config_data *config;
 	int ret = 0;
 
+	START_PROFILE(syscall_kernel_flock);
+
 	SMB_VFS_HANDLE_GET_DATA(handle, config,
 				struct gpfs_config_data,
 				return -1);
@@ -86,8 +88,6 @@ static int vfs_gpfs_kernel_flock(vfs_handle_struct *handle, files_struct *fsp,
 		return 0;
 	}
 
-	START_PROFILE(syscall_kernel_flock);
-
 	kernel_flock(fsp->fh->fd, share_mode, access_mask);
 
 	if (!set_gpfs_sharemode(fsp, access_mask, fsp->share_access)) {
@@ -121,6 +121,8 @@ static int vfs_gpfs_setlease(vfs_handle_struct *handle, files_struct *fsp,
 	struct gpfs_config_data *config;
 	int ret=0;
 
+	START_PROFILE(syscall_linux_setlease);
+
 	SMB_VFS_HANDLE_GET_DATA(handle, config,
 				struct gpfs_config_data,
 				return -1);
@@ -128,8 +130,6 @@ static int vfs_gpfs_setlease(vfs_handle_struct *handle, files_struct *fsp,
 	if (linux_set_lease_sighandler(fsp->fh->fd) == -1)
 		return -1;
 
-	START_PROFILE(syscall_linux_setlease);
-
 	if (config->leases) {
 		/*
 		 * Ensure the lease owner is root to allow
-- 
1.7.9.5

-------------- next part --------------
From 8e47e28e6be0d15bb360ede3d29bf3f9d5577886 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Fri, 12 Sep 2014 13:03:52 +0200
Subject: [PATCH] vfs_gpfs: Fix the build with profiling-data

This fails with -Werror=declaration-after-statement

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 source3/modules/vfs_gpfs.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index e722a86..6ead65b 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -78,6 +78,8 @@ static int vfs_gpfs_kernel_flock(vfs_handle_struct *handle, files_struct *fsp,
 	struct gpfs_config_data *config;
 	int ret = 0;
 
+	START_PROFILE(syscall_kernel_flock);
+
 	SMB_VFS_HANDLE_GET_DATA(handle, config,
 				struct gpfs_config_data,
 				return -1);
@@ -86,8 +88,6 @@ static int vfs_gpfs_kernel_flock(vfs_handle_struct *handle, files_struct *fsp,
 		return 0;
 	}
 
-	START_PROFILE(syscall_kernel_flock);
-
 	kernel_flock(fsp->fh->fd, share_mode, access_mask);
 
 	if (!set_gpfs_sharemode(fsp, access_mask, fsp->share_access)) {
@@ -121,6 +121,8 @@ static int vfs_gpfs_setlease(vfs_handle_struct *handle, files_struct *fsp,
 	struct gpfs_config_data *config;
 	int ret=0;
 
+	START_PROFILE(syscall_linux_setlease);
+
 	SMB_VFS_HANDLE_GET_DATA(handle, config,
 				struct gpfs_config_data,
 				return -1);
@@ -128,8 +130,6 @@ static int vfs_gpfs_setlease(vfs_handle_struct *handle, files_struct *fsp,
 	if (linux_set_lease_sighandler(fsp->fh->fd) == -1)
 		return -1;
 
-	START_PROFILE(syscall_linux_setlease);
-
 	if (config->leases) {
 		/*
 		 * Ensure the lease owner is root to allow
-- 
1.7.9.5



More information about the samba-technical mailing list