mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02:00
NFS: remove nfs_start_delegation_return
There is only one caller, so fold it into that. With that, nfs_start_delegation_return Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
This commit is contained in:
parent
ee443e1161
commit
635879a427
|
|
@ -336,17 +336,6 @@ nfs_start_delegation_return_locked(struct nfs_inode *nfsi)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static struct nfs_delegation *
|
||||
nfs_start_delegation_return(struct nfs_inode *nfsi)
|
||||
{
|
||||
struct nfs_delegation *delegation;
|
||||
|
||||
rcu_read_lock();
|
||||
delegation = nfs_start_delegation_return_locked(nfsi);
|
||||
rcu_read_unlock();
|
||||
return delegation;
|
||||
}
|
||||
|
||||
static void nfs_abort_delegation_return(struct nfs_delegation *delegation,
|
||||
struct nfs_server *server, int err)
|
||||
{
|
||||
|
|
@ -793,15 +782,18 @@ int nfs4_inode_return_delegation(struct inode *inode)
|
|||
struct nfs_inode *nfsi = NFS_I(inode);
|
||||
struct nfs_delegation *delegation;
|
||||
|
||||
delegation = nfs_start_delegation_return(nfsi);
|
||||
if (delegation != NULL) {
|
||||
/* Synchronous recall of any application leases */
|
||||
break_lease(inode, O_WRONLY | O_RDWR);
|
||||
if (S_ISREG(inode->i_mode))
|
||||
nfs_wb_all(inode);
|
||||
return nfs_end_delegation_return(inode, delegation, 1);
|
||||
}
|
||||
return 0;
|
||||
rcu_read_lock();
|
||||
delegation = nfs_start_delegation_return_locked(nfsi);
|
||||
rcu_read_unlock();
|
||||
|
||||
if (!delegation)
|
||||
return 0;
|
||||
|
||||
/* Synchronous recall of any application leases */
|
||||
break_lease(inode, O_WRONLY | O_RDWR);
|
||||
if (S_ISREG(inode->i_mode))
|
||||
nfs_wb_all(inode);
|
||||
return nfs_end_delegation_return(inode, delegation, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user