Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'nfsd-4.7-3' of git://linux-nfs.org/~bfields/linux

Pull lockd/locks fixes from Bruce Fields:
"One fix for lockd soft lookups in an error path, and one fix for file
leases on overlayfs"

* tag 'nfsd-4.7-3' of git://linux-nfs.org/~bfields/linux:
locks: use file_inode()
lockd: unregister notifier blocks if the service fails to come up completely

+11 -4
+10 -3
fs/lockd/svc.c
··· 335 335 }; 336 336 #endif 337 337 338 - static void lockd_svc_exit_thread(void) 338 + static void lockd_unregister_notifiers(void) 339 339 { 340 340 unregister_inetaddr_notifier(&lockd_inetaddr_notifier); 341 341 #if IS_ENABLED(CONFIG_IPV6) 342 342 unregister_inet6addr_notifier(&lockd_inet6addr_notifier); 343 343 #endif 344 + } 345 + 346 + static void lockd_svc_exit_thread(void) 347 + { 348 + lockd_unregister_notifiers(); 344 349 svc_exit_thread(nlmsvc_rqst); 345 350 } 346 351 ··· 467 462 * Note: svc_serv structures have an initial use count of 1, 468 463 * so we exit through here on both success and failure. 469 464 */ 470 - err_net: 465 + err_put: 471 466 svc_destroy(serv); 472 467 err_create: 473 468 mutex_unlock(&nlmsvc_mutex); ··· 475 470 476 471 err_start: 477 472 lockd_down_net(serv, net); 478 - goto err_net; 473 + err_net: 474 + lockd_unregister_notifiers(); 475 + goto err_put; 479 476 } 480 477 EXPORT_SYMBOL_GPL(lockd_up); 481 478
+1 -1
fs/locks.c
··· 1628 1628 { 1629 1629 struct file_lock *fl, *my_fl = NULL, *lease; 1630 1630 struct dentry *dentry = filp->f_path.dentry; 1631 - struct inode *inode = dentry->d_inode; 1631 + struct inode *inode = file_inode(filp); 1632 1632 struct file_lock_context *ctx; 1633 1633 bool is_deleg = (*flp)->fl_flags & FL_DELEG; 1634 1634 int error;