Commit b9746ef8 authored by Jeff Layton's avatar Jeff Layton Committed by Al Viro

locks: make "added" in __posix_lock_file a bool

Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
Acked-by: default avatarJ. Bruce Fields <bfields@fieldses.org>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 1cb36012
...@@ -791,7 +791,8 @@ static int __posix_lock_file(struct inode *inode, struct file_lock *request, str ...@@ -791,7 +791,8 @@ static int __posix_lock_file(struct inode *inode, struct file_lock *request, str
struct file_lock *left = NULL; struct file_lock *left = NULL;
struct file_lock *right = NULL; struct file_lock *right = NULL;
struct file_lock **before; struct file_lock **before;
int error, added = 0; int error;
bool added = false;
/* /*
* We may need two file_lock structures for this operation, * We may need two file_lock structures for this operation,
...@@ -885,7 +886,7 @@ static int __posix_lock_file(struct inode *inode, struct file_lock *request, str ...@@ -885,7 +886,7 @@ static int __posix_lock_file(struct inode *inode, struct file_lock *request, str
continue; continue;
} }
request = fl; request = fl;
added = 1; added = true;
} }
else { else {
/* Processing for different lock types is a bit /* Processing for different lock types is a bit
...@@ -896,7 +897,7 @@ static int __posix_lock_file(struct inode *inode, struct file_lock *request, str ...@@ -896,7 +897,7 @@ static int __posix_lock_file(struct inode *inode, struct file_lock *request, str
if (fl->fl_start > request->fl_end) if (fl->fl_start > request->fl_end)
break; break;
if (request->fl_type == F_UNLCK) if (request->fl_type == F_UNLCK)
added = 1; added = true;
if (fl->fl_start < request->fl_start) if (fl->fl_start < request->fl_start)
left = fl; left = fl;
/* If the next lock in the list has a higher end /* If the next lock in the list has a higher end
...@@ -926,7 +927,7 @@ static int __posix_lock_file(struct inode *inode, struct file_lock *request, str ...@@ -926,7 +927,7 @@ static int __posix_lock_file(struct inode *inode, struct file_lock *request, str
locks_release_private(fl); locks_release_private(fl);
locks_copy_private(fl, request); locks_copy_private(fl, request);
request = fl; request = fl;
added = 1; added = true;
} }
} }
/* Go on to next lock. /* Go on to next lock.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment