From: Christoph Hellwig Date: Wed, 28 Jan 2026 04:46:04 +0000 (+0100) Subject: NFS: return void from ->return_delegation X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1cb730e847d9766b7fb416e623454a5cba57dc4;p=thirdparty%2Fkernel%2Flinux.git NFS: return void from ->return_delegation The caller doesn't check the return value, so drop it. Signed-off-by: Christoph Hellwig Signed-off-by: Anna Schumaker --- diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index c77c7b2d58774..fe1f57ec326c8 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -814,23 +814,21 @@ void nfs_inode_evict_delegation(struct inode *inode) * * Returns zero on success, or a negative errno value. */ -int nfs4_inode_return_delegation(struct inode *inode) +void nfs4_inode_return_delegation(struct inode *inode) { struct nfs_inode *nfsi = NFS_I(inode); struct nfs_delegation *delegation; - int err; delegation = nfs_start_delegation_return(nfsi); if (!delegation) - return 0; + return; /* Synchronous recall of any application leases */ break_lease(inode, O_WRONLY | O_RDWR); if (S_ISREG(inode->i_mode)) nfs_wb_all(inode); - err = nfs_end_delegation_return(inode, delegation, 1); + nfs_end_delegation_return(inode, delegation, 1); nfs_put_delegation(delegation); - return err; } /** diff --git a/fs/nfs/delegation.h b/fs/nfs/delegation.h index d30f19a280775..eda39fcb032b4 100644 --- a/fs/nfs/delegation.h +++ b/fs/nfs/delegation.h @@ -47,7 +47,7 @@ int nfs_inode_set_delegation(struct inode *inode, const struct cred *cred, void nfs_inode_reclaim_delegation(struct inode *inode, const struct cred *cred, fmode_t type, const nfs4_stateid *stateid, unsigned long pagemod_limit, u32 deleg_type); -int nfs4_inode_return_delegation(struct inode *inode); +void nfs4_inode_return_delegation(struct inode *inode); void nfs4_inode_return_delegation_on_close(struct inode *inode); void nfs4_inode_set_return_delegation_on_close(struct inode *inode); int nfs_async_inode_return_delegation(struct inode *inode, const nfs4_stateid *stateid); diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index 1181f9cc6dbdb..d3d2fbeba89d3 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c @@ -1027,11 +1027,10 @@ static int nfs3_have_delegation(struct inode *inode, fmode_t type, int flags) return 0; } -static int nfs3_return_delegation(struct inode *inode) +static void nfs3_return_delegation(struct inode *inode) { if (S_ISREG(inode->i_mode)) nfs_wb_all(inode); - return 0; } static const struct inode_operations nfs3_dir_inode_operations = { diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c index 39df80e4ae6fd..0e440ebf5335c 100644 --- a/fs/nfs/proc.c +++ b/fs/nfs/proc.c @@ -697,11 +697,10 @@ static int nfs_have_delegation(struct inode *inode, fmode_t type, int flags) return 0; } -static int nfs_return_delegation(struct inode *inode) +static void nfs_return_delegation(struct inode *inode) { if (S_ISREG(inode->i_mode)) nfs_wb_all(inode); - return 0; } static const struct inode_operations nfs_dir_inode_operations = { diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 437e6f4af7e02..ff1f12aa73d27 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h @@ -1846,7 +1846,7 @@ struct nfs_rpc_ops { struct iattr *iattr, int *); int (*have_delegation)(struct inode *, fmode_t, int); - int (*return_delegation)(struct inode *); + void (*return_delegation)(struct inode *); struct nfs_client *(*alloc_client) (const struct nfs_client_initdata *); struct nfs_client *(*init_client) (struct nfs_client *, const struct nfs_client_initdata *);