diff mbox

lease02: Do a lock-unlock sequence instead of lock-lock

Message ID 1425479163-2602-1-git-send-email-daniel.wagner@bmw-carit.de (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Wagner March 4, 2015, 2:26 p.m. UTC
Fix the copy&paste error.

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
---
 lease02.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jeff Layton March 4, 2015, 9:02 p.m. UTC | #1
On Wed,  4 Mar 2015 15:26:03 +0100
Daniel Wagner <daniel.wagner@bmw-carit.de> wrote:

> Fix the copy&paste error.
> 
> Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
> ---
>  lease02.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lease02.c b/lease02.c
> index 6450e16..45433a4 100644
> --- a/lease02.c
> +++ b/lease02.c
> @@ -64,7 +64,7 @@ leaseunlease(int nrlock, struct timespec *slot)
>  			perror("fcntl");
>  			break;
>  		}
> -		ret = fcntl(fd, F_SETLEASE, F_RDLCK);
> +		ret = fcntl(fd, F_SETLEASE, F_UNLCK);
>  		if (ret < 0) {
>  			perror("fcntl");
>  			break;

Merged. Thanks for the patch!
diff mbox

Patch

diff --git a/lease02.c b/lease02.c
index 6450e16..45433a4 100644
--- a/lease02.c
+++ b/lease02.c
@@ -64,7 +64,7 @@  leaseunlease(int nrlock, struct timespec *slot)
 			perror("fcntl");
 			break;
 		}
-		ret = fcntl(fd, F_SETLEASE, F_RDLCK);
+		ret = fcntl(fd, F_SETLEASE, F_UNLCK);
 		if (ret < 0) {
 			perror("fcntl");
 			break;