Skip to content

Commit 5f348e7

Browse files
committed
fs/locks: optimize locks_remove_posix
remove the three lines, because locks_init_lock init them by memset0: lock.fl_start = 0; lock.fl_ops = NULL; lock.fl_lmops = NULL; Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent 66a4909 commit 5f348e7

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

fs/locks.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2554,13 +2554,10 @@ void locks_remove_posix(struct file *filp, fl_owner_t owner)
25542554
locks_init_lock(&lock);
25552555
lock.fl_type = F_UNLCK;
25562556
lock.fl_flags = FL_POSIX | FL_CLOSE;
2557-
lock.fl_start = 0;
25582557
lock.fl_end = OFFSET_MAX;
25592558
lock.fl_owner = owner;
25602559
lock.fl_pid = current->tgid;
25612560
lock.fl_file = filp;
2562-
lock.fl_ops = NULL;
2563-
lock.fl_lmops = NULL;
25642561

25652562
error = vfs_lock_file(filp, F_SETLK, &lock, NULL);
25662563

0 commit comments

Comments
 (0)