diff options
author | NeilBrown <neilb@suse.com> | 2018-11-29 18:04:08 -0500 |
---|---|---|
committer | Jeff Layton <jlayton@kernel.org> | 2018-12-07 06:51:00 -0500 |
commit | 7bbd1fc0e9f1281f9a7122dbfd6641b523c4e4ed (patch) | |
tree | 514c30defd48347ea8760b00dca91aa969ee1c55 /fs | |
parent | cb03f94ffb070b13bc0fa58b4ef4fdb558418d27 (diff) |
fs/locks: remove unnecessary white space.
- spaces before tabs,
- spaces at the end of lines,
- multiple blank lines,
- blank lines before EXPORT_SYMBOL,
can all go.
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/locks.c | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/fs/locks.c b/fs/locks.c index 75a03a9d666e..b6b43970f461 100644 --- a/fs/locks.c +++ b/fs/locks.c | |||
@@ -11,11 +11,11 @@ | |||
11 | * | 11 | * |
12 | * Miscellaneous edits, and a total rewrite of posix_lock_file() code. | 12 | * Miscellaneous edits, and a total rewrite of posix_lock_file() code. |
13 | * Kai Petzke (wpp@marie.physik.tu-berlin.de), 1994 | 13 | * Kai Petzke (wpp@marie.physik.tu-berlin.de), 1994 |
14 | * | 14 | * |
15 | * Converted file_lock_table to a linked list from an array, which eliminates | 15 | * Converted file_lock_table to a linked list from an array, which eliminates |
16 | * the limits on how many active file locks are open. | 16 | * the limits on how many active file locks are open. |
17 | * Chad Page (pageone@netcom.com), November 27, 1994 | 17 | * Chad Page (pageone@netcom.com), November 27, 1994 |
18 | * | 18 | * |
19 | * Removed dependency on file descriptors. dup()'ed file descriptors now | 19 | * Removed dependency on file descriptors. dup()'ed file descriptors now |
20 | * get the same locks as the original file descriptors, and a close() on | 20 | * get the same locks as the original file descriptors, and a close() on |
21 | * any file descriptor removes ALL the locks on the file for the current | 21 | * any file descriptor removes ALL the locks on the file for the current |
@@ -41,7 +41,7 @@ | |||
41 | * with a file pointer (filp). As a result they can be shared by a parent | 41 | * with a file pointer (filp). As a result they can be shared by a parent |
42 | * process and its children after a fork(). They are removed when the last | 42 | * process and its children after a fork(). They are removed when the last |
43 | * file descriptor referring to the file pointer is closed (unless explicitly | 43 | * file descriptor referring to the file pointer is closed (unless explicitly |
44 | * unlocked). | 44 | * unlocked). |
45 | * | 45 | * |
46 | * FL_FLOCK locks never deadlock, an existing lock is always removed before | 46 | * FL_FLOCK locks never deadlock, an existing lock is always removed before |
47 | * upgrading from shared to exclusive (or vice versa). When this happens | 47 | * upgrading from shared to exclusive (or vice versa). When this happens |
@@ -50,7 +50,7 @@ | |||
50 | * Andy Walker (andy@lysaker.kvaerner.no), June 09, 1995 | 50 | * Andy Walker (andy@lysaker.kvaerner.no), June 09, 1995 |
51 | * | 51 | * |
52 | * Removed some race conditions in flock_lock_file(), marked other possible | 52 | * Removed some race conditions in flock_lock_file(), marked other possible |
53 | * races. Just grep for FIXME to see them. | 53 | * races. Just grep for FIXME to see them. |
54 | * Dmitry Gorodchanin (pgmdsg@ibi.com), February 09, 1996. | 54 | * Dmitry Gorodchanin (pgmdsg@ibi.com), February 09, 1996. |
55 | * | 55 | * |
56 | * Addressed Dmitry's concerns. Deadlock checking no longer recursive. | 56 | * Addressed Dmitry's concerns. Deadlock checking no longer recursive. |
@@ -399,7 +399,6 @@ void locks_init_lock(struct file_lock *fl) | |||
399 | memset(fl, 0, sizeof(struct file_lock)); | 399 | memset(fl, 0, sizeof(struct file_lock)); |
400 | locks_init_lock_heads(fl); | 400 | locks_init_lock_heads(fl); |
401 | } | 401 | } |
402 | |||
403 | EXPORT_SYMBOL(locks_init_lock); | 402 | EXPORT_SYMBOL(locks_init_lock); |
404 | 403 | ||
405 | /* | 404 | /* |
@@ -439,7 +438,6 @@ void locks_copy_lock(struct file_lock *new, struct file_lock *fl) | |||
439 | fl->fl_ops->fl_copy_lock(new, fl); | 438 | fl->fl_ops->fl_copy_lock(new, fl); |
440 | } | 439 | } |
441 | } | 440 | } |
442 | |||
443 | EXPORT_SYMBOL(locks_copy_lock); | 441 | EXPORT_SYMBOL(locks_copy_lock); |
444 | 442 | ||
445 | static void locks_move_blocks(struct file_lock *new, struct file_lock *fl) | 443 | static void locks_move_blocks(struct file_lock *new, struct file_lock *fl) |
@@ -482,7 +480,7 @@ flock_make_lock(struct file *filp, unsigned int cmd, struct file_lock *fl) | |||
482 | 480 | ||
483 | if (type < 0) | 481 | if (type < 0) |
484 | return ERR_PTR(type); | 482 | return ERR_PTR(type); |
485 | 483 | ||
486 | if (fl == NULL) { | 484 | if (fl == NULL) { |
487 | fl = locks_alloc_lock(); | 485 | fl = locks_alloc_lock(); |
488 | if (fl == NULL) | 486 | if (fl == NULL) |
@@ -497,7 +495,7 @@ flock_make_lock(struct file *filp, unsigned int cmd, struct file_lock *fl) | |||
497 | fl->fl_flags = FL_FLOCK; | 495 | fl->fl_flags = FL_FLOCK; |
498 | fl->fl_type = type; | 496 | fl->fl_type = type; |
499 | fl->fl_end = OFFSET_MAX; | 497 | fl->fl_end = OFFSET_MAX; |
500 | 498 | ||
501 | return fl; | 499 | return fl; |
502 | } | 500 | } |
503 | 501 | ||
@@ -1169,8 +1167,8 @@ static int posix_lock_inode(struct inode *inode, struct file_lock *request, | |||
1169 | } | 1167 | } |
1170 | spin_unlock(&blocked_lock_lock); | 1168 | spin_unlock(&blocked_lock_lock); |
1171 | goto out; | 1169 | goto out; |
1172 | } | 1170 | } |
1173 | } | 1171 | } |
1174 | 1172 | ||
1175 | /* If we're just looking for a conflict, we're done. */ | 1173 | /* If we're just looking for a conflict, we're done. */ |
1176 | error = 0; | 1174 | error = 0; |
@@ -1465,7 +1463,6 @@ int locks_mandatory_area(struct inode *inode, struct file *filp, loff_t start, | |||
1465 | 1463 | ||
1466 | return error; | 1464 | return error; |
1467 | } | 1465 | } |
1468 | |||
1469 | EXPORT_SYMBOL(locks_mandatory_area); | 1466 | EXPORT_SYMBOL(locks_mandatory_area); |
1470 | #endif /* CONFIG_MANDATORY_FILE_LOCKING */ | 1467 | #endif /* CONFIG_MANDATORY_FILE_LOCKING */ |
1471 | 1468 | ||
@@ -1667,7 +1664,6 @@ out: | |||
1667 | locks_free_lock(new_fl); | 1664 | locks_free_lock(new_fl); |
1668 | return error; | 1665 | return error; |
1669 | } | 1666 | } |
1670 | |||
1671 | EXPORT_SYMBOL(__break_lease); | 1667 | EXPORT_SYMBOL(__break_lease); |
1672 | 1668 | ||
1673 | /** | 1669 | /** |
@@ -1698,7 +1694,6 @@ void lease_get_mtime(struct inode *inode, struct timespec64 *time) | |||
1698 | if (has_lease) | 1694 | if (has_lease) |
1699 | *time = current_time(inode); | 1695 | *time = current_time(inode); |
1700 | } | 1696 | } |
1701 | |||
1702 | EXPORT_SYMBOL(lease_get_mtime); | 1697 | EXPORT_SYMBOL(lease_get_mtime); |
1703 | 1698 | ||
1704 | /** | 1699 | /** |
@@ -1753,8 +1748,8 @@ int fcntl_getlease(struct file *filp) | |||
1753 | 1748 | ||
1754 | /** | 1749 | /** |
1755 | * check_conflicting_open - see if the given dentry points to a file that has | 1750 | * check_conflicting_open - see if the given dentry points to a file that has |
1756 | * an existing open that would conflict with the | 1751 | * an existing open that would conflict with the |
1757 | * desired lease. | 1752 | * desired lease. |
1758 | * @dentry: dentry to check | 1753 | * @dentry: dentry to check |
1759 | * @arg: type of lease that we're trying to acquire | 1754 | * @arg: type of lease that we're trying to acquire |
1760 | * @flags: current lock flags | 1755 | * @flags: current lock flags |
@@ -1978,7 +1973,7 @@ EXPORT_SYMBOL(generic_setlease); | |||
1978 | * @arg: type of lease to obtain | 1973 | * @arg: type of lease to obtain |
1979 | * @lease: file_lock to use when adding a lease | 1974 | * @lease: file_lock to use when adding a lease |
1980 | * @priv: private info for lm_setup when adding a lease (may be | 1975 | * @priv: private info for lm_setup when adding a lease (may be |
1981 | * NULL if lm_setup doesn't require it) | 1976 | * NULL if lm_setup doesn't require it) |
1982 | * | 1977 | * |
1983 | * Call this to establish a lease on the file. The "lease" argument is not | 1978 | * Call this to establish a lease on the file. The "lease" argument is not |
1984 | * used for F_UNLCK requests and may be NULL. For commands that set or alter | 1979 | * used for F_UNLCK requests and may be NULL. For commands that set or alter |
@@ -2266,7 +2261,7 @@ int fcntl_getlk(struct file *filp, unsigned int cmd, struct flock *flock) | |||
2266 | error = vfs_test_lock(filp, fl); | 2261 | error = vfs_test_lock(filp, fl); |
2267 | if (error) | 2262 | if (error) |
2268 | goto out; | 2263 | goto out; |
2269 | 2264 | ||
2270 | flock->l_type = fl->fl_type; | 2265 | flock->l_type = fl->fl_type; |
2271 | if (fl->fl_type != F_UNLCK) { | 2266 | if (fl->fl_type != F_UNLCK) { |
2272 | error = posix_lock_to_flock(flock, fl); | 2267 | error = posix_lock_to_flock(flock, fl); |
@@ -2614,7 +2609,6 @@ void locks_remove_posix(struct file *filp, fl_owner_t owner) | |||
2614 | lock.fl_ops->fl_release_private(&lock); | 2609 | lock.fl_ops->fl_release_private(&lock); |
2615 | trace_locks_remove_posix(inode, &lock, error); | 2610 | trace_locks_remove_posix(inode, &lock, error); |
2616 | } | 2611 | } |
2617 | |||
2618 | EXPORT_SYMBOL(locks_remove_posix); | 2612 | EXPORT_SYMBOL(locks_remove_posix); |
2619 | 2613 | ||
2620 | /* The i_flctx must be valid when calling into here */ | 2614 | /* The i_flctx must be valid when calling into here */ |
@@ -2700,7 +2694,6 @@ int vfs_cancel_lock(struct file *filp, struct file_lock *fl) | |||
2700 | return filp->f_op->lock(filp, F_CANCELLK, fl); | 2694 | return filp->f_op->lock(filp, F_CANCELLK, fl); |
2701 | return 0; | 2695 | return 0; |
2702 | } | 2696 | } |
2703 | |||
2704 | EXPORT_SYMBOL_GPL(vfs_cancel_lock); | 2697 | EXPORT_SYMBOL_GPL(vfs_cancel_lock); |
2705 | 2698 | ||
2706 | #ifdef CONFIG_PROC_FS | 2699 | #ifdef CONFIG_PROC_FS |
@@ -2900,7 +2893,6 @@ static int __init filelock_init(void) | |||
2900 | filelock_cache = kmem_cache_create("file_lock_cache", | 2893 | filelock_cache = kmem_cache_create("file_lock_cache", |
2901 | sizeof(struct file_lock), 0, SLAB_PANIC, NULL); | 2894 | sizeof(struct file_lock), 0, SLAB_PANIC, NULL); |
2902 | 2895 | ||
2903 | |||
2904 | for_each_possible_cpu(i) { | 2896 | for_each_possible_cpu(i) { |
2905 | struct file_lock_list_struct *fll = per_cpu_ptr(&file_lock_list, i); | 2897 | struct file_lock_list_struct *fll = per_cpu_ptr(&file_lock_list, i); |
2906 | 2898 | ||
@@ -2910,5 +2902,4 @@ static int __init filelock_init(void) | |||
2910 | 2902 | ||
2911 | return 0; | 2903 | return 0; |
2912 | } | 2904 | } |
2913 | |||
2914 | core_initcall(filelock_init); | 2905 | core_initcall(filelock_init); |