PATCH [5/10] lease interfaces for version 4 NFSD
Subsystems (2)
VFS: move the f_delown processing from lease_modify() into a new default lock manager fl_release_private callback.
Signed-off-by Andy Adamson <[email protected]>
fs/locks.c +10 -4
@@ -395,8 +395,18 @@ static void lease_break_callback(structkill_fasync (&fl->fl_fasync,SIGIO ,POLL_MSG ); } +static void lease_release_private_callback (struct file_lock *fl) +{ +if (!fl->fl_file) +return ; + +f_delown (fl->fl_file); + fl->fl_file->f_owner.signum =0 ; +} +struct lock_manager_operations lease_manager_ops = { .fl_break = lease_break_callback, + .fl_release_private = lease_release_private_callback, };/*
@@ -1051,10 +1061,6 @@ static int lease_modify(struct file_lockreturn error;locks_wake_up_blocks (fl);if (arg ==F_UNLCK ) { -struct file *filp = fl->fl_file; - -f_delown (filp); - filp->f_owner.signum =0 ;locks_delete_lock (before); }return 0 ;