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.

NFS: use bool for the issync argument to nfs_end_delegation_return

Replace the integer used as boolean with a bool type, and tidy up
the prototype and top of function comment.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>

authored by

Christoph Hellwig and committed by
Anna Schumaker
2bd7ebcf b1cb730e

+9 -6
+9 -6
fs/nfs/delegation.c
··· 560 560 } 561 561 562 562 /* 563 - * Basic procedure for returning a delegation to the server 563 + * Basic procedure for returning a delegation to the server. 564 + * If @issync is set, wait until state recovery has finished. Otherwise 565 + * return -EAGAIN to the caller if we need more time. 564 566 */ 565 - static int nfs_end_delegation_return(struct inode *inode, struct nfs_delegation *delegation, int issync) 567 + static int nfs_end_delegation_return(struct inode *inode, 568 + struct nfs_delegation *delegation, bool issync) 566 569 { 567 570 struct nfs_server *server = NFS_SERVER(inode); 568 571 unsigned int mode = O_WRONLY | O_RDWR; ··· 638 635 639 636 nfs_clear_verifier_delegated(inode); 640 637 641 - err = nfs_end_delegation_return(inode, delegation, 0); 638 + err = nfs_end_delegation_return(inode, delegation, false); 642 639 if (err) { 643 640 nfs_mark_return_delegation(server, delegation); 644 641 goto out_put_inode; ··· 830 827 break_lease(inode, O_WRONLY | O_RDWR); 831 828 if (S_ISREG(inode->i_mode)) 832 829 nfs_wb_all(inode); 833 - nfs_end_delegation_return(inode, delegation, 1); 830 + nfs_end_delegation_return(inode, delegation, true); 834 831 nfs_put_delegation(delegation); 835 832 } 836 833 ··· 866 863 spin_unlock(&delegation->lock); 867 864 if (return_now) { 868 865 nfs_clear_verifier_delegated(inode); 869 - nfs_end_delegation_return(inode, delegation, 0); 866 + nfs_end_delegation_return(inode, delegation, false); 870 867 } 871 868 nfs_put_delegation(delegation); 872 869 } ··· 901 898 902 899 if (return_now) { 903 900 nfs_clear_verifier_delegated(inode); 904 - nfs_end_delegation_return(inode, delegation, 0); 901 + nfs_end_delegation_return(inode, delegation, false); 905 902 } else { 906 903 nfs_delegation_add_lru(server, delegation); 907 904 }