NFS: Fix a number of sparse warnings
Fix a number of "warning: symbol 'foo' was not declared. Should it be static?" conditions. Fix 2 cases of "warning: Using plain integer as NULL pointer" fs/nfs/delegation.c:263:31: warning: restricted fmode_t degrades to integer - We want to allow upgrades to a WRITE delegation, but should otherwise consider servers that hand out duplicate delegations to be borken. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
5ffaf85541
commit
17280175c5
13 changed files with 38 additions and 33 deletions
|
@ -256,11 +256,14 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct
|
|||
/*
|
||||
* Deal with broken servers that hand out two
|
||||
* delegations for the same file.
|
||||
* Allow for upgrades to a WRITE delegation, but
|
||||
* nothing else.
|
||||
*/
|
||||
dfprintk(FILE, "%s: server %s handed out "
|
||||
"a duplicate delegation!\n",
|
||||
__func__, clp->cl_hostname);
|
||||
if (delegation->type <= old_delegation->type) {
|
||||
if (delegation->type == old_delegation->type ||
|
||||
!(delegation->type & FMODE_WRITE)) {
|
||||
freeme = delegation;
|
||||
delegation = NULL;
|
||||
goto out;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue