Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 369af0f1 authored by Chuck Lever's avatar Chuck Lever Committed by Trond Myklebust
Browse files

NFS: Clean up fs/nfs/idmap.c



Clean up white space damage and use standard kernel coding conventions for
return statements.

Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 7df08995
Loading
Loading
Loading
Loading
+44 −43
Original line number Diff line number Diff line
@@ -115,7 +115,8 @@ nfs_idmap_new(struct nfs_client *clp)

	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;

	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));
	mutex_unlock(&idmap->idmap_im_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;

	if (mlen != sizeof(im_in))
                return (-ENOSPC);
		return -ENOSPC;

	if (copy_from_user(&im_in, src, mlen) != 0)
		return (-EFAULT);
		return -EFAULT;

	mutex_lock(&idmap->idmap_im_lock);

@@ -487,7 +488,7 @@ static unsigned int fnvhash32(const void *buf, size_t buflen)
		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)