NFS: Clean up fs/nfs/idmap.c
Clean up white space damage and use standard kernel coding conventions for return statements. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
7df089952f
commit
369af0f116
1 changed files with 44 additions and 43 deletions
|
@ -115,7 +115,8 @@ nfs_idmap_new(struct nfs_client *clp)
|
||||||
|
|
||||||
BUG_ON(clp->cl_idmap != NULL);
|
BUG_ON(clp->cl_idmap != NULL);
|
||||||
|
|
||||||
if ((idmap = kzalloc(sizeof(*idmap), GFP_KERNEL)) == NULL)
|
idmap = kzalloc(sizeof(*idmap), GFP_KERNEL);
|
||||||
|
if (idmap == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
idmap->idmap_dentry = rpc_mkpipe(clp->cl_rpcclient->cl_dentry, "idmap",
|
idmap->idmap_dentry = rpc_mkpipe(clp->cl_rpcclient->cl_dentry, "idmap",
|
||||||
|
@ -285,7 +286,7 @@ nfs_idmap_id(struct idmap *idmap, struct idmap_hashtable *h,
|
||||||
memset(im, 0, sizeof(*im));
|
memset(im, 0, sizeof(*im));
|
||||||
mutex_unlock(&idmap->idmap_im_lock);
|
mutex_unlock(&idmap->idmap_im_lock);
|
||||||
mutex_unlock(&idmap->idmap_lock);
|
mutex_unlock(&idmap->idmap_lock);
|
||||||
return (ret);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -386,10 +387,10 @@ idmap_pipe_downcall(struct file *filp, const char __user *src, size_t mlen)
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (mlen != sizeof(im_in))
|
if (mlen != sizeof(im_in))
|
||||||
return (-ENOSPC);
|
return -ENOSPC;
|
||||||
|
|
||||||
if (copy_from_user(&im_in, src, mlen) != 0)
|
if (copy_from_user(&im_in, src, mlen) != 0)
|
||||||
return (-EFAULT);
|
return -EFAULT;
|
||||||
|
|
||||||
mutex_lock(&idmap->idmap_im_lock);
|
mutex_lock(&idmap->idmap_im_lock);
|
||||||
|
|
||||||
|
@ -487,7 +488,7 @@ static unsigned int fnvhash32(const void *buf, size_t buflen)
|
||||||
hash ^= (unsigned int)*p;
|
hash ^= (unsigned int)*p;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (hash);
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
int nfs_map_name_to_uid(struct nfs_client *clp, const char *name, size_t namelen, __u32 *uid)
|
int nfs_map_name_to_uid(struct nfs_client *clp, const char *name, size_t namelen, __u32 *uid)
|
||||||
|
|
Loading…
Add table
Reference in a new issue