Commit b4d629a3 authored by Jeff Layton's avatar Jeff Layton

locks: rename __posix_lock_file to posix_lock_inode

...a more descriptive name and we can drop the double underscore prefix.
Signed-off-by: default avatarJeff Layton <jeff.layton@primarydata.com>
Acked-by: default avatar"J. Bruce Fields" <bfields@fieldses.org>
parent e24dadab
...@@ -961,7 +961,8 @@ static int flock_lock_inode(struct inode *inode, struct file_lock *request) ...@@ -961,7 +961,8 @@ static int flock_lock_inode(struct inode *inode, struct file_lock *request)
return error; return error;
} }
static int __posix_lock_file(struct inode *inode, struct file_lock *request, struct file_lock *conflock) static int posix_lock_inode(struct inode *inode, struct file_lock *request,
struct file_lock *conflock)
{ {
struct file_lock *fl, *tmp; struct file_lock *fl, *tmp;
struct file_lock *new_fl = NULL; struct file_lock *new_fl = NULL;
...@@ -1191,7 +1192,7 @@ static int __posix_lock_file(struct inode *inode, struct file_lock *request, str ...@@ -1191,7 +1192,7 @@ static int __posix_lock_file(struct inode *inode, struct file_lock *request, str
int posix_lock_file(struct file *filp, struct file_lock *fl, int posix_lock_file(struct file *filp, struct file_lock *fl,
struct file_lock *conflock) struct file_lock *conflock)
{ {
return __posix_lock_file(file_inode(filp), fl, conflock); return posix_lock_inode(file_inode(filp), fl, conflock);
} }
EXPORT_SYMBOL(posix_lock_file); EXPORT_SYMBOL(posix_lock_file);
...@@ -1207,7 +1208,7 @@ static int posix_lock_inode_wait(struct inode *inode, struct file_lock *fl) ...@@ -1207,7 +1208,7 @@ static int posix_lock_inode_wait(struct inode *inode, struct file_lock *fl)
int error; int error;
might_sleep (); might_sleep ();
for (;;) { for (;;) {
error = __posix_lock_file(inode, fl, NULL); error = posix_lock_inode(inode, fl, NULL);
if (error != FILE_LOCK_DEFERRED) if (error != FILE_LOCK_DEFERRED)
break; break;
error = wait_event_interruptible(fl->fl_wait, !fl->fl_next); error = wait_event_interruptible(fl->fl_wait, !fl->fl_next);
...@@ -1290,7 +1291,7 @@ int locks_mandatory_area(int read_write, struct inode *inode, ...@@ -1290,7 +1291,7 @@ int locks_mandatory_area(int read_write, struct inode *inode,
if (filp) { if (filp) {
fl.fl_owner = filp; fl.fl_owner = filp;
fl.fl_flags &= ~FL_SLEEP; fl.fl_flags &= ~FL_SLEEP;
error = __posix_lock_file(inode, &fl, NULL); error = posix_lock_inode(inode, &fl, NULL);
if (!error) if (!error)
break; break;
} }
...@@ -1298,7 +1299,7 @@ int locks_mandatory_area(int read_write, struct inode *inode, ...@@ -1298,7 +1299,7 @@ int locks_mandatory_area(int read_write, struct inode *inode,
if (sleep) if (sleep)
fl.fl_flags |= FL_SLEEP; fl.fl_flags |= FL_SLEEP;
fl.fl_owner = current->files; fl.fl_owner = current->files;
error = __posix_lock_file(inode, &fl, NULL); error = posix_lock_inode(inode, &fl, NULL);
if (error != FILE_LOCK_DEFERRED) if (error != FILE_LOCK_DEFERRED)
break; break;
error = wait_event_interruptible(fl.fl_wait, !fl.fl_next); error = wait_event_interruptible(fl.fl_wait, !fl.fl_next);
......
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