aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/locks.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/locks.c b/fs/locks.c
index ca272eb63c30..a91f4ab00a90 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -961,7 +961,8 @@ out:
961 return error; 961 return error;
962} 962}
963 963
964static int __posix_lock_file(struct inode *inode, struct file_lock *request, struct file_lock *conflock) 964static int posix_lock_inode(struct inode *inode, struct file_lock *request,
965 struct file_lock *conflock)
965{ 966{
966 struct file_lock *fl, *tmp; 967 struct file_lock *fl, *tmp;
967 struct file_lock *new_fl = NULL; 968 struct file_lock *new_fl = NULL;
@@ -1191,7 +1192,7 @@ static int __posix_lock_file(struct inode *inode, struct file_lock *request, str
1191int posix_lock_file(struct file *filp, struct file_lock *fl, 1192int posix_lock_file(struct file *filp, struct file_lock *fl,
1192 struct file_lock *conflock) 1193 struct file_lock *conflock)
1193{ 1194{
1194 return __posix_lock_file(file_inode(filp), fl, conflock); 1195 return posix_lock_inode(file_inode(filp), fl, conflock);
1195} 1196}
1196EXPORT_SYMBOL(posix_lock_file); 1197EXPORT_SYMBOL(posix_lock_file);
1197 1198
@@ -1207,7 +1208,7 @@ static int posix_lock_inode_wait(struct inode *inode, struct file_lock *fl)
1207 int error; 1208 int error;
1208 might_sleep (); 1209 might_sleep ();
1209 for (;;) { 1210 for (;;) {
1210 error = __posix_lock_file(inode, fl, NULL); 1211 error = posix_lock_inode(inode, fl, NULL);
1211 if (error != FILE_LOCK_DEFERRED) 1212 if (error != FILE_LOCK_DEFERRED)
1212 break; 1213 break;
1213 error = wait_event_interruptible(fl->fl_wait, !fl->fl_next); 1214 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 if (filp) { 1291 if (filp) {
1291 fl.fl_owner = filp; 1292 fl.fl_owner = filp;
1292 fl.fl_flags &= ~FL_SLEEP; 1293 fl.fl_flags &= ~FL_SLEEP;
1293 error = __posix_lock_file(inode, &fl, NULL); 1294 error = posix_lock_inode(inode, &fl, NULL);
1294 if (!error) 1295 if (!error)
1295 break; 1296 break;
1296 } 1297 }
@@ -1298,7 +1299,7 @@ int locks_mandatory_area(int read_write, struct inode *inode,
1298 if (sleep) 1299 if (sleep)
1299 fl.fl_flags |= FL_SLEEP; 1300 fl.fl_flags |= FL_SLEEP;
1300 fl.fl_owner = current->files; 1301 fl.fl_owner = current->files;
1301 error = __posix_lock_file(inode, &fl, NULL); 1302 error = posix_lock_inode(inode, &fl, NULL);
1302 if (error != FILE_LOCK_DEFERRED) 1303 if (error != FILE_LOCK_DEFERRED)
1303 break; 1304 break;
1304 error = wait_event_interruptible(fl.fl_wait, !fl.fl_next); 1305 error = wait_event_interruptible(fl.fl_wait, !fl.fl_next);