From: Trond Myklebust fcntl(F_SETSIG) no longer works on leases because lease_release_private_callback() gets called as the lease is copied in order to initialise it. The problem is that lease_alloc() performs an unnecessary initialisation, which sets the lease_manager_ops. Avoid the problem by allocating the target lease structure using locks_alloc_lock(). Signed-off-by: Trond Myklebust Cc: akpm: this is speculative. If we backport this to -stable please make sure it's the correct version. Signed-off-by: Andrew Morton --- fs/locks.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff -puN fs/locks.c~fcntlf_setsig-fix fs/locks.c --- a/fs/locks.c~fcntlf_setsig-fix +++ a/fs/locks.c @@ -1421,8 +1421,9 @@ static int __setlease(struct file *filp, if (!leases_enable) goto out; - error = lease_alloc(filp, arg, &fl); - if (error) + error = -ENOMEM; + fl = locks_alloc_lock(); + if (fl == NULL) goto out; locks_copy_lock(fl, lease); @@ -1430,6 +1431,7 @@ static int __setlease(struct file *filp, locks_insert_lock(before, fl); *flp = fl; + error = 0; out: return error; } _