Skip to content

Commit 96d6d59

Browse files
author
J. Bruce Fields
committed
locks: move lease-specific code out of locks_delete_lock
No point putting something only used by one caller into common code. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
1 parent 3b6e272 commit 96d6d59

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

‎fs/locks.c‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -570,12 +570,6 @@ static void locks_delete_lock(struct file_lock **thisfl_p)
570570
fl->fl_next = NULL;
571571
list_del_init(&fl->fl_link);
572572

573-
fasync_helper(0, fl->fl_file, 0, &fl->fl_fasync);
574-
if (fl->fl_fasync != NULL) {
575-
printk(KERN_ERR "locks_delete_lock: fasync == %p\n", fl->fl_fasync);
576-
fl->fl_fasync = NULL;
577-
}
578-
579573
if (fl->fl_nspid) {
580574
put_pid(fl->fl_nspid);
581575
fl->fl_nspid = NULL;
@@ -1150,6 +1144,11 @@ int lease_modify(struct file_lock **before, int arg)
11501144

11511145
f_delown(filp);
11521146
filp->f_owner.signum = 0;
1147+
fasync_helper(0, fl->fl_file, 0, &fl->fl_fasync);
1148+
if (fl->fl_fasync != NULL) {
1149+
printk(KERN_ERR "locks_delete_lock: fasync == %p\n", fl->fl_fasync);
1150+
fl->fl_fasync = NULL;
1151+
}
11531152
locks_delete_lock(before);
11541153
}
11551154
return 0;

0 commit comments

Comments
 (0)