Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Conflicts: net/sunrpc/auth_gss/gss_krb5_crypto.c net/sunrpc/auth_gss/gss_spkm3_token.c net/sunrpc/clnt.c Merge with mainline and fix conflicts.
This commit is contained in:
@@ -71,6 +71,8 @@ static void nfs_callback_svc(struct svc_rqst *rqstp)
|
||||
complete(&nfs_callback_info.started);
|
||||
|
||||
for(;;) {
|
||||
char buf[RPC_MAX_ADDRBUFLEN];
|
||||
|
||||
if (signalled()) {
|
||||
if (nfs_callback_info.users == 0)
|
||||
break;
|
||||
@@ -88,8 +90,8 @@ static void nfs_callback_svc(struct svc_rqst *rqstp)
|
||||
__FUNCTION__, -err);
|
||||
break;
|
||||
}
|
||||
dprintk("%s: request from %u.%u.%u.%u\n", __FUNCTION__,
|
||||
NIPQUAD(rqstp->rq_addr.sin_addr.s_addr));
|
||||
dprintk("%s: request from %s\n", __FUNCTION__,
|
||||
svc_print_addr(rqstp, buf, sizeof(buf)));
|
||||
svc_process(rqstp);
|
||||
}
|
||||
|
||||
@@ -106,7 +108,6 @@ static void nfs_callback_svc(struct svc_rqst *rqstp)
|
||||
int nfs_callback_up(void)
|
||||
{
|
||||
struct svc_serv *serv;
|
||||
struct svc_sock *svsk;
|
||||
int ret = 0;
|
||||
|
||||
lock_kernel();
|
||||
@@ -119,17 +120,14 @@ int nfs_callback_up(void)
|
||||
ret = -ENOMEM;
|
||||
if (!serv)
|
||||
goto out_err;
|
||||
/* FIXME: We don't want to register this socket with the portmapper */
|
||||
ret = svc_makesock(serv, IPPROTO_TCP, nfs_callback_set_tcpport);
|
||||
if (ret < 0)
|
||||
|
||||
ret = svc_makesock(serv, IPPROTO_TCP, nfs_callback_set_tcpport,
|
||||
SVC_SOCK_ANONYMOUS);
|
||||
if (ret <= 0)
|
||||
goto out_destroy;
|
||||
if (!list_empty(&serv->sv_permsocks)) {
|
||||
svsk = list_entry(serv->sv_permsocks.next,
|
||||
struct svc_sock, sk_list);
|
||||
nfs_callback_tcpport = ntohs(inet_sk(svsk->sk_sk)->sport);
|
||||
dprintk ("Callback port = 0x%x\n", nfs_callback_tcpport);
|
||||
} else
|
||||
BUG();
|
||||
nfs_callback_tcpport = ret;
|
||||
dprintk("Callback port = 0x%x\n", nfs_callback_tcpport);
|
||||
|
||||
ret = svc_create_thread(nfs_callback_svc, serv);
|
||||
if (ret < 0)
|
||||
goto out_destroy;
|
||||
@@ -140,6 +138,8 @@ out:
|
||||
unlock_kernel();
|
||||
return ret;
|
||||
out_destroy:
|
||||
dprintk("Couldn't create callback socket or server thread; err = %d\n",
|
||||
ret);
|
||||
svc_destroy(serv);
|
||||
out_err:
|
||||
nfs_callback_info.users--;
|
||||
@@ -166,15 +166,19 @@ void nfs_callback_down(void)
|
||||
|
||||
static int nfs_callback_authenticate(struct svc_rqst *rqstp)
|
||||
{
|
||||
struct sockaddr_in *addr = &rqstp->rq_addr;
|
||||
struct sockaddr_in *addr = svc_addr_in(rqstp);
|
||||
struct nfs_client *clp;
|
||||
char buf[RPC_MAX_ADDRBUFLEN];
|
||||
|
||||
/* Don't talk to strangers */
|
||||
clp = nfs_find_client(addr, 4);
|
||||
if (clp == NULL)
|
||||
return SVC_DROP;
|
||||
dprintk("%s: %u.%u.%u.%u NFSv4 callback!\n", __FUNCTION__, NIPQUAD(addr->sin_addr));
|
||||
|
||||
dprintk("%s: %s NFSv4 callback!\n", __FUNCTION__,
|
||||
svc_print_addr(rqstp, buf, sizeof(buf)));
|
||||
nfs_put_client(clp);
|
||||
|
||||
switch (rqstp->rq_authop->flavour) {
|
||||
case RPC_AUTH_NULL:
|
||||
if (rqstp->rq_proc != CB_NULL)
|
||||
|
@@ -176,7 +176,7 @@ static __be32 decode_getattr_args(struct svc_rqst *rqstp, struct xdr_stream *xdr
|
||||
status = decode_fh(xdr, &args->fh);
|
||||
if (unlikely(status != 0))
|
||||
goto out;
|
||||
args->addr = &rqstp->rq_addr;
|
||||
args->addr = svc_addr_in(rqstp);
|
||||
status = decode_bitmap(xdr, args->bitmap);
|
||||
out:
|
||||
dprintk("%s: exit with status = %d\n", __FUNCTION__, status);
|
||||
@@ -188,7 +188,7 @@ static __be32 decode_recall_args(struct svc_rqst *rqstp, struct xdr_stream *xdr,
|
||||
__be32 *p;
|
||||
__be32 status;
|
||||
|
||||
args->addr = &rqstp->rq_addr;
|
||||
args->addr = svc_addr_in(rqstp);
|
||||
status = decode_stateid(xdr, &args->stateid);
|
||||
if (unlikely(status != 0))
|
||||
goto out;
|
||||
|
@@ -1181,7 +1181,7 @@ static struct seq_operations nfs_server_list_ops = {
|
||||
.show = nfs_server_list_show,
|
||||
};
|
||||
|
||||
static struct file_operations nfs_server_list_fops = {
|
||||
static const struct file_operations nfs_server_list_fops = {
|
||||
.open = nfs_server_list_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
@@ -1201,7 +1201,7 @@ static struct seq_operations nfs_volume_list_ops = {
|
||||
.show = nfs_volume_list_show,
|
||||
};
|
||||
|
||||
static struct file_operations nfs_volume_list_fops = {
|
||||
static const struct file_operations nfs_volume_list_fops = {
|
||||
.open = nfs_volume_list_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
|
@@ -65,7 +65,7 @@ const struct file_operations nfs_dir_operations = {
|
||||
.fsync = nfs_fsync_dir,
|
||||
};
|
||||
|
||||
struct inode_operations nfs_dir_inode_operations = {
|
||||
const struct inode_operations nfs_dir_inode_operations = {
|
||||
.create = nfs_create,
|
||||
.lookup = nfs_lookup,
|
||||
.link = nfs_link,
|
||||
@@ -81,7 +81,7 @@ struct inode_operations nfs_dir_inode_operations = {
|
||||
};
|
||||
|
||||
#ifdef CONFIG_NFS_V3
|
||||
struct inode_operations nfs3_dir_inode_operations = {
|
||||
const struct inode_operations nfs3_dir_inode_operations = {
|
||||
.create = nfs_create,
|
||||
.lookup = nfs_lookup,
|
||||
.link = nfs_link,
|
||||
@@ -104,7 +104,7 @@ struct inode_operations nfs3_dir_inode_operations = {
|
||||
#ifdef CONFIG_NFS_V4
|
||||
|
||||
static struct dentry *nfs_atomic_lookup(struct inode *, struct dentry *, struct nameidata *);
|
||||
struct inode_operations nfs4_dir_inode_operations = {
|
||||
const struct inode_operations nfs4_dir_inode_operations = {
|
||||
.create = nfs_create,
|
||||
.lookup = nfs_atomic_lookup,
|
||||
.link = nfs_link,
|
||||
|
@@ -68,14 +68,14 @@ const struct file_operations nfs_file_operations = {
|
||||
.check_flags = nfs_check_flags,
|
||||
};
|
||||
|
||||
struct inode_operations nfs_file_inode_operations = {
|
||||
const struct inode_operations nfs_file_inode_operations = {
|
||||
.permission = nfs_permission,
|
||||
.getattr = nfs_getattr,
|
||||
.setattr = nfs_setattr,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_NFS_V3
|
||||
struct inode_operations nfs3_file_inode_operations = {
|
||||
const struct inode_operations nfs3_file_inode_operations = {
|
||||
.permission = nfs_permission,
|
||||
.getattr = nfs_getattr,
|
||||
.setattr = nfs_setattr,
|
||||
|
@@ -155,12 +155,12 @@ out_follow:
|
||||
goto out;
|
||||
}
|
||||
|
||||
struct inode_operations nfs_mountpoint_inode_operations = {
|
||||
const struct inode_operations nfs_mountpoint_inode_operations = {
|
||||
.follow_link = nfs_follow_mountpoint,
|
||||
.getattr = nfs_getattr,
|
||||
};
|
||||
|
||||
struct inode_operations nfs_referral_inode_operations = {
|
||||
const struct inode_operations nfs_referral_inode_operations = {
|
||||
.follow_link = nfs_follow_mountpoint,
|
||||
};
|
||||
|
||||
|
@@ -151,7 +151,7 @@ struct nfs4_state_recovery_ops {
|
||||
};
|
||||
|
||||
extern struct dentry_operations nfs4_dentry_operations;
|
||||
extern struct inode_operations nfs4_dir_inode_operations;
|
||||
extern const struct inode_operations nfs4_dir_inode_operations;
|
||||
|
||||
/* inode.c */
|
||||
extern ssize_t nfs4_getxattr(struct dentry *, const char *, void *, size_t);
|
||||
|
@@ -3584,7 +3584,7 @@ struct nfs4_state_recovery_ops nfs4_network_partition_recovery_ops = {
|
||||
.recover_lock = nfs4_lock_expired,
|
||||
};
|
||||
|
||||
static struct inode_operations nfs4_file_inode_operations = {
|
||||
static const struct inode_operations nfs4_file_inode_operations = {
|
||||
.permission = nfs_permission,
|
||||
.getattr = nfs_getattr,
|
||||
.setattr = nfs_setattr,
|
||||
|
@@ -44,6 +44,7 @@
|
||||
#include <linux/vfs.h>
|
||||
#include <linux/inet.h>
|
||||
#include <linux/nfs_xdr.h>
|
||||
#include <linux/magic.h>
|
||||
|
||||
#include <asm/system.h>
|
||||
#include <asm/uaccess.h>
|
||||
@@ -81,7 +82,7 @@ struct file_system_type nfs_xdev_fs_type = {
|
||||
.fs_flags = FS_RENAME_DOES_D_MOVE|FS_REVAL_DOT|FS_BINARY_MOUNTDATA,
|
||||
};
|
||||
|
||||
static struct super_operations nfs_sops = {
|
||||
static const struct super_operations nfs_sops = {
|
||||
.alloc_inode = nfs_alloc_inode,
|
||||
.destroy_inode = nfs_destroy_inode,
|
||||
.write_inode = nfs_write_inode,
|
||||
@@ -125,7 +126,7 @@ struct file_system_type nfs4_referral_fs_type = {
|
||||
.fs_flags = FS_RENAME_DOES_D_MOVE|FS_REVAL_DOT|FS_BINARY_MOUNTDATA,
|
||||
};
|
||||
|
||||
static struct super_operations nfs4_sops = {
|
||||
static const struct super_operations nfs4_sops = {
|
||||
.alloc_inode = nfs_alloc_inode,
|
||||
.destroy_inode = nfs_destroy_inode,
|
||||
.write_inode = nfs_write_inode,
|
||||
|
@@ -78,7 +78,7 @@ read_failed:
|
||||
/*
|
||||
* symlinks can't do much...
|
||||
*/
|
||||
struct inode_operations nfs_symlink_inode_operations = {
|
||||
const struct inode_operations nfs_symlink_inode_operations = {
|
||||
.readlink = generic_readlink,
|
||||
.follow_link = nfs_follow_link,
|
||||
.put_link = page_put_link,
|
||||
|
Reference in New Issue
Block a user