Commit b42895d6 authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.linux-nfs.org/pub/linux/nfs-2.6

* git://git.linux-nfs.org/pub/linux/nfs-2.6:
  SUNRPC: Fix sparse warnings
  NLM: Fix sparse warnings
  NFS: Fix more sparse warnings
  NFS: Fix some 'sparse' warnings...
  SUNRPC: remove dead variable 'rpciod_running'
  NFS4: Fix incorrect use of sizeof() in fs/nfs/nfs4xdr.c
  NFS: use zero_user_page
  NLM: don't use CLONE_SIGHAND in nlmclnt_recovery
  NLM: Fix locking client timeouts...
parents d3a36fb8 dd504ea1
......@@ -153,7 +153,7 @@ nlmclnt_recovery(struct nlm_host *host)
if (!host->h_reclaiming++) {
nlm_get_host(host);
__module_get(THIS_MODULE);
if (kernel_thread(reclaimer, host, CLONE_KERNEL) < 0)
if (kernel_thread(reclaimer, host, CLONE_FS | CLONE_FILES) < 0)
module_put(THIS_MODULE);
}
}
......
......@@ -221,7 +221,7 @@ nlm_bind_host(struct nlm_host *host)
host->h_nextrebind - jiffies);
}
} else {
unsigned long increment = nlmsvc_timeout * HZ;
unsigned long increment = nlmsvc_timeout;
struct rpc_timeout timeparms = {
.to_initval = increment,
.to_increment = increment,
......
......@@ -586,10 +586,6 @@ static struct rpc_version nlm_version3 = {
.procs = nlm_procedures,
};
#ifdef CONFIG_LOCKD_V4
extern struct rpc_version nlm_version4;
#endif
static struct rpc_version * nlm_versions[] = {
[1] = &nlm_version1,
[3] = &nlm_version3,
......
......@@ -123,7 +123,8 @@ static __be32 *
nlm4_decode_lock(__be32 *p, struct nlm_lock *lock)
{
struct file_lock *fl = &lock->fl;
__s64 len, start, end;
__u64 len, start;
__s64 end;
if (!(p = xdr_decode_string_inplace(p, &lock->caller,
&lock->len, NLM_MAXSTRLEN))
......@@ -417,7 +418,8 @@ nlm4clt_decode_testres(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp)
if (resp->status == nlm_lck_denied) {
struct file_lock *fl = &resp->lock.fl;
u32 excl;
s64 start, end, len;
__u64 start, len;
__s64 end;
memset(&resp->lock, 0, sizeof(resp->lock));
locks_init_lock(fl);
......
......@@ -24,7 +24,7 @@ enum nfs4_callback_opnum {
};
struct cb_compound_hdr_arg {
int taglen;
unsigned int taglen;
const char *tag;
unsigned int callback_ident;
unsigned nops;
......@@ -32,7 +32,7 @@ struct cb_compound_hdr_arg {
struct cb_compound_hdr_res {
__be32 *status;
int taglen;
unsigned int taglen;
const char *tag;
__be32 *nops;
};
......
......@@ -226,7 +226,7 @@ void nfs_return_all_delegations(struct super_block *sb)
spin_unlock(&clp->cl_lock);
}
int nfs_do_expire_all_delegations(void *ptr)
static int nfs_do_expire_all_delegations(void *ptr)
{
struct nfs_client *clp = ptr;
struct nfs_delegation *delegation;
......
......@@ -607,7 +607,7 @@ static int nfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
return res;
}
loff_t nfs_llseek_dir(struct file *filp, loff_t offset, int origin)
static loff_t nfs_llseek_dir(struct file *filp, loff_t offset, int origin)
{
mutex_lock(&filp->f_path.dentry->d_inode->i_mutex);
switch (origin) {
......@@ -633,7 +633,7 @@ loff_t nfs_llseek_dir(struct file *filp, loff_t offset, int origin)
* All directory operations under NFS are synchronous, so fsync()
* is a dummy operation.
*/
int nfs_fsync_dir(struct file *filp, struct dentry *dentry, int datasync)
static int nfs_fsync_dir(struct file *filp, struct dentry *dentry, int datasync)
{
dfprintk(VFS, "NFS: fsync_dir(%s/%s) datasync %d\n",
dentry->d_parent->d_name.name, dentry->d_name.name,
......
......@@ -790,7 +790,7 @@ static int _nfs4_do_access(struct inode *inode, struct rpc_cred *cred, int openf
return -EACCES;
}
int nfs4_recover_expired_lease(struct nfs_server *server)
static int nfs4_recover_expired_lease(struct nfs_server *server)
{
struct nfs_client *clp = server->nfs_client;
int ret;
......@@ -2748,7 +2748,7 @@ static int nfs4_delay(struct rpc_clnt *clnt, long *timeout)
/* This is the error handling routine for processes that are allowed
* to sleep.
*/
int nfs4_handle_exception(const struct nfs_server *server, int errorcode, struct nfs4_exception *exception)
static int nfs4_handle_exception(const struct nfs_server *server, int errorcode, struct nfs4_exception *exception)
{
struct nfs_client *clp = server->nfs_client;
int ret = errorcode;
......
......@@ -104,7 +104,7 @@ struct rpc_cred *nfs4_get_renew_cred(struct nfs_client *clp)
return cred;
}
struct rpc_cred *nfs4_get_setclientid_cred(struct nfs_client *clp)
static struct rpc_cred *nfs4_get_setclientid_cred(struct nfs_client *clp)
{
struct nfs4_state_owner *sp;
......
This diff is collapsed.
......@@ -79,7 +79,7 @@ void nfs_readdata_release(void *data)
static
int nfs_return_empty_page(struct page *page)
{
memclear_highpage_flush(page, 0, PAGE_CACHE_SIZE);
zero_user_page(page, 0, PAGE_CACHE_SIZE, KM_USER0);
SetPageUptodate(page);
unlock_page(page);
return 0;
......@@ -103,10 +103,10 @@ static void nfs_readpage_truncate_uninitialised_page(struct nfs_read_data *data)
pglen = PAGE_CACHE_SIZE - base;
for (;;) {
if (remainder <= pglen) {
memclear_highpage_flush(*pages, base, remainder);
zero_user_page(*pages, base, remainder, KM_USER0);
break;
}
memclear_highpage_flush(*pages, base, pglen);
zero_user_page(*pages, base, pglen, KM_USER0);
pages++;
remainder -= pglen;
pglen = PAGE_CACHE_SIZE;
......@@ -130,7 +130,7 @@ static int nfs_readpage_async(struct nfs_open_context *ctx, struct inode *inode,
return PTR_ERR(new);
}
if (len < PAGE_CACHE_SIZE)
memclear_highpage_flush(page, len, PAGE_CACHE_SIZE - len);
zero_user_page(page, len, PAGE_CACHE_SIZE - len, KM_USER0);
nfs_list_add_request(new, &one_request);
if (NFS_SERVER(inode)->rsize < PAGE_CACHE_SIZE)
......@@ -532,7 +532,7 @@ readpage_async_filler(void *data, struct page *page)
return PTR_ERR(new);
}
if (len < PAGE_CACHE_SIZE)
memclear_highpage_flush(page, len, PAGE_CACHE_SIZE - len);
zero_user_page(page, len, PAGE_CACHE_SIZE - len, KM_USER0);
nfs_pageio_add_request(desc->pgio, new);
return 0;
}
......
......@@ -58,7 +58,7 @@ struct nfs_write_data *nfs_commit_alloc(void)
return p;
}
void nfs_commit_rcu_free(struct rcu_head *head)
static void nfs_commit_rcu_free(struct rcu_head *head)
{
struct nfs_write_data *p = container_of(head, struct nfs_write_data, task.u.tk_rcu);
if (p && (p->pagevec != &p->page_array[0]))
......@@ -168,7 +168,7 @@ static void nfs_mark_uptodate(struct page *page, unsigned int base, unsigned int
if (count != nfs_page_length(page))
return;
if (count != PAGE_CACHE_SIZE)
memclear_highpage_flush(page, count, PAGE_CACHE_SIZE - count);
zero_user_page(page, count, PAGE_CACHE_SIZE - count, KM_USER0);
SetPageUptodate(page);
}
......@@ -922,7 +922,7 @@ static int nfs_flush_one(struct inode *inode, struct list_head *head, unsigned i
return 0;
out_bad:
while (!list_empty(head)) {
struct nfs_page *req = nfs_list_entry(head->next);
req = nfs_list_entry(head->next);
nfs_list_remove_request(req);
nfs_redirty_request(req);
nfs_end_page_writeback(req->wb_page);
......
......@@ -42,5 +42,6 @@ int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *);
int nlmclt_encode_cancargs(struct rpc_rqst *, u32 *, struct nlm_args *);
int nlmclt_encode_unlockargs(struct rpc_rqst *, u32 *, struct nlm_args *);
*/
extern struct rpc_version nlm_version4;
#endif /* LOCKD_XDR4_H */
......@@ -16,6 +16,7 @@
#include <linux/types.h>
#define NFS4_VERIFIER_SIZE 8
#define NFS4_STATEID_SIZE 16
#define NFS4_FHSIZE 128
#define NFS4_MAXPATHLEN PATH_MAX
#define NFS4_MAXNAMLEN NAME_MAX
......@@ -113,7 +114,7 @@ struct nfs4_acl {
};
typedef struct { char data[NFS4_VERIFIER_SIZE]; } nfs4_verifier;
typedef struct { char data[16]; } nfs4_stateid;
typedef struct { char data[NFS4_STATEID_SIZE]; } nfs4_stateid;
enum nfs_opnum4 {
OP_ACCESS = 3,
......
......@@ -47,6 +47,8 @@ extern struct dentry *rpc_mkpipe(struct dentry *, const char *, void *, struct r
extern int rpc_unlink(struct dentry *);
extern struct vfsmount *rpc_get_mount(void);
extern void rpc_put_mount(void);
extern int register_rpc_pipefs(void);
extern void unregister_rpc_pipefs(void);
#endif
#endif
......@@ -244,6 +244,8 @@ void xprt_disconnect(struct rpc_xprt *xprt);
*/
struct rpc_xprt * xs_setup_udp(struct sockaddr *addr, size_t addrlen, struct rpc_timeout *to);
struct rpc_xprt * xs_setup_tcp(struct sockaddr *addr, size_t addrlen, struct rpc_timeout *to);
int init_socket_xprt(void);
void cleanup_socket_xprt(void);
/*
* Reserved bit positions in xprt->state
......
......@@ -989,8 +989,6 @@ void rpc_killall_tasks(struct rpc_clnt *clnt)
spin_unlock(&rpc_sched_lock);
}
static DECLARE_MUTEX_LOCKED(rpciod_running);
static void rpciod_killall(void)
{
unsigned long flags;
......
......@@ -134,11 +134,7 @@ EXPORT_SYMBOL(nfsd_debug);
EXPORT_SYMBOL(nlm_debug);
#endif
extern int register_rpc_pipefs(void);
extern void unregister_rpc_pipefs(void);
extern struct cache_detail ip_map_cache, unix_gid_cache;
extern int init_socket_xprt(void);
extern void cleanup_socket_xprt(void);
static int __init
init_sunrpc(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment