Skip to content

Commit

Permalink
Merge branch 'for-2.6.37' of git://linux-nfs.org/~bfields/linux
Browse files Browse the repository at this point in the history
* 'for-2.6.37' of git://linux-nfs.org/~bfields/linux: (99 commits)
  svcrpc: svc_tcp_sendto XPT_DEAD check is redundant
  svcrpc: no need for XPT_DEAD check in svc_xprt_enqueue
  svcrpc: assume svc_delete_xprt() called only once
  svcrpc: never clear XPT_BUSY on dead xprt
  nfsd4: fix connection allocation in sequence()
  nfsd4: only require krb5 principal for NFSv4.0 callbacks
  nfsd4: move minorversion to client
  nfsd4: delay session removal till free_client
  nfsd4: separate callback change and callback probe
  nfsd4: callback program number is per-session
  nfsd4: track backchannel connections
  nfsd4: confirm only on succesful create_session
  nfsd4: make backchannel sequence number per-session
  nfsd4: use client pointer to backchannel session
  nfsd4: move callback setup into session init code
  nfsd4: don't cache seq_misordered replies
  SUNRPC: Properly initialize sock_xprt.srcaddr in all cases
  SUNRPC: Use conventional switch statement when reclassifying sockets
  sunrpc/xprtrdma: clean up workqueue usage
  sunrpc: Turn list_for_each-s into the ..._entry-s
  ...

Fix up trivial conflicts (two different deprecation notices added in
separate branches) in Documentation/feature-removal-schedule.txt
  • Loading branch information
torvalds committed Oct 26, 2010
2 parents a4dd8dc + 42d7ba3 commit 4390110
Show file tree
Hide file tree
Showing 61 changed files with 1,535 additions and 1,937 deletions.
10 changes: 10 additions & 0 deletions Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -535,3 +535,13 @@ Why: Hareware scan is the prefer method for iwlwifi devices for
Who: Wey-Yi Guy <[email protected]>

----------------------------

What: access to nfsd auth cache through sys_nfsservctl or '.' files
in the 'nfsd' filesystem.
When: 2.6.40
Why: This is a legacy interface which have been replaced by a more
dynamic cache. Continuing to maintain this interface is an
unnecessary burden.
Who: NeilBrown <[email protected]>

----------------------------
5 changes: 1 addition & 4 deletions fs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ obj-$(CONFIG_EVENTFD) += eventfd.o
obj-$(CONFIG_AIO) += aio.o
obj-$(CONFIG_FILE_LOCKING) += locks.o
obj-$(CONFIG_COMPAT) += compat.o compat_ioctl.o

nfsd-$(CONFIG_NFSD) := nfsctl.o
obj-y += $(nfsd-y) $(nfsd-m)

obj-$(CONFIG_NFSD_DEPRECATED) += nfsctl.o
obj-$(CONFIG_BINFMT_AOUT) += binfmt_aout.o
obj-$(CONFIG_BINFMT_EM86) += binfmt_em86.o
obj-$(CONFIG_BINFMT_MISC) += binfmt_misc.o
Expand Down
2 changes: 1 addition & 1 deletion fs/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1963,7 +1963,7 @@ asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds,
}
#endif /* HAVE_SET_RESTORE_SIGMASK */

#if defined(CONFIG_NFSD) || defined(CONFIG_NFSD_MODULE)
#if (defined(CONFIG_NFSD) || defined(CONFIG_NFSD_MODULE)) && !defined(CONFIG_NFSD_DEPRECATED)
/* Stuff for NFS server syscalls... */
struct compat_nfsctl_svc {
u16 svc32_port;
Expand Down
1 change: 1 addition & 0 deletions fs/lockd/host.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ nlm_bind_host(struct nlm_host *host)
.to_retries = 5U,
};
struct rpc_create_args args = {
.net = &init_net,
.protocol = host->h_proto,
.address = nlm_addr(host),
.addrsize = host->h_addrlen,
Expand Down
1 change: 1 addition & 0 deletions fs/lockd/mon.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ static struct rpc_clnt *nsm_create(void)
.sin_addr.s_addr = htonl(INADDR_LOOPBACK),
};
struct rpc_create_args args = {
.net = &init_net,
.protocol = XPRT_TRANSPORT_UDP,
.address = (struct sockaddr *)&sin,
.addrsize = sizeof(sin),
Expand Down
2 changes: 1 addition & 1 deletion fs/lockd/svc.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ static int create_lockd_listener(struct svc_serv *serv, const char *name,

xprt = svc_find_xprt(serv, name, family, 0);
if (xprt == NULL)
return svc_create_xprt(serv, name, family, port,
return svc_create_xprt(serv, name, &init_net, family, port,
SVC_SOCK_DEFAULTS);
svc_xprt_put(xprt);
return 0;
Expand Down
2 changes: 0 additions & 2 deletions fs/lockd/svc4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,7 @@ static void nlm4svc_callback_exit(struct rpc_task *task, void *data)

static void nlm4svc_callback_release(void *data)
{
lock_kernel();
nlm_release_call(data);
unlock_kernel();
}

static const struct rpc_call_ops nlm4svc_callback_ops = {
Expand Down
31 changes: 21 additions & 10 deletions fs/lockd/svclock.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,13 @@ static const struct rpc_call_ops nlmsvc_grant_ops;
* The list of blocked locks to retry
*/
static LIST_HEAD(nlm_blocked);
static DEFINE_SPINLOCK(nlm_blocked_lock);

/*
* Insert a blocked lock into the global list
*/
static void
nlmsvc_insert_block(struct nlm_block *block, unsigned long when)
nlmsvc_insert_block_locked(struct nlm_block *block, unsigned long when)
{
struct nlm_block *b;
struct list_head *pos;
Expand Down Expand Up @@ -87,14 +88,23 @@ nlmsvc_insert_block(struct nlm_block *block, unsigned long when)
block->b_when = when;
}

static void nlmsvc_insert_block(struct nlm_block *block, unsigned long when)
{
spin_lock(&nlm_blocked_lock);
nlmsvc_insert_block_locked(block, when);
spin_unlock(&nlm_blocked_lock);
}

/*
* Remove a block from the global list
*/
static inline void
nlmsvc_remove_block(struct nlm_block *block)
{
if (!list_empty(&block->b_list)) {
spin_lock(&nlm_blocked_lock);
list_del_init(&block->b_list);
spin_unlock(&nlm_blocked_lock);
nlmsvc_release_block(block);
}
}
Expand Down Expand Up @@ -651,7 +661,7 @@ static int nlmsvc_grant_deferred(struct file_lock *fl, struct file_lock *conf,
struct nlm_block *block;
int rc = -ENOENT;

lock_kernel();
spin_lock(&nlm_blocked_lock);
list_for_each_entry(block, &nlm_blocked, b_list) {
if (nlm_compare_locks(&block->b_call->a_args.lock.fl, fl)) {
dprintk("lockd: nlmsvc_notify_blocked block %p flags %d\n",
Expand All @@ -665,13 +675,13 @@ static int nlmsvc_grant_deferred(struct file_lock *fl, struct file_lock *conf,
} else if (result == 0)
block->b_granted = 1;

nlmsvc_insert_block(block, 0);
nlmsvc_insert_block_locked(block, 0);
svc_wake_up(block->b_daemon);
rc = 0;
break;
}
}
unlock_kernel();
spin_unlock(&nlm_blocked_lock);
if (rc == -ENOENT)
printk(KERN_WARNING "lockd: grant for unknown block\n");
return rc;
Expand Down Expand Up @@ -803,7 +813,7 @@ static void nlmsvc_grant_callback(struct rpc_task *task, void *data)

dprintk("lockd: GRANT_MSG RPC callback\n");

lock_kernel();
spin_lock(&nlm_blocked_lock);
/* if the block is not on a list at this point then it has
* been invalidated. Don't try to requeue it.
*
Expand All @@ -825,19 +835,20 @@ static void nlmsvc_grant_callback(struct rpc_task *task, void *data)
/* Call was successful, now wait for client callback */
timeout = 60 * HZ;
}
nlmsvc_insert_block(block, timeout);
nlmsvc_insert_block_locked(block, timeout);
svc_wake_up(block->b_daemon);
out:
unlock_kernel();
spin_unlock(&nlm_blocked_lock);
}

/*
* FIXME: nlmsvc_release_block() grabs a mutex. This is not allowed for an
* .rpc_release rpc_call_op
*/
static void nlmsvc_grant_release(void *data)
{
struct nlm_rqst *call = data;

lock_kernel();
nlmsvc_release_block(call->a_block);
unlock_kernel();
}

static const struct rpc_call_ops nlmsvc_grant_ops = {
Expand Down
2 changes: 0 additions & 2 deletions fs/lockd/svcproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,7 @@ static void nlmsvc_callback_exit(struct rpc_task *task, void *data)

static void nlmsvc_callback_release(void *data)
{
lock_kernel();
nlm_release_call(data);
unlock_kernel();
}

static const struct rpc_call_ops nlmsvc_callback_ops = {
Expand Down
4 changes: 2 additions & 2 deletions fs/nfs/callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ nfs4_callback_up(struct svc_serv *serv)
{
int ret;

ret = svc_create_xprt(serv, "tcp", PF_INET,
ret = svc_create_xprt(serv, "tcp", &init_net, PF_INET,
nfs_callback_set_tcpport, SVC_SOCK_ANONYMOUS);
if (ret <= 0)
goto out_err;
nfs_callback_tcpport = ret;
dprintk("NFS: Callback listener port = %u (af %u)\n",
nfs_callback_tcpport, PF_INET);

ret = svc_create_xprt(serv, "tcp", PF_INET6,
ret = svc_create_xprt(serv, "tcp", &init_net, PF_INET6,
nfs_callback_set_tcpport, SVC_SOCK_ANONYMOUS);
if (ret > 0) {
nfs_callback_tcpport6 = ret;
Expand Down
1 change: 1 addition & 0 deletions fs/nfs/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ static int nfs_create_rpc_client(struct nfs_client *clp,
{
struct rpc_clnt *clnt = NULL;
struct rpc_create_args args = {
.net = &init_net,
.protocol = clp->cl_proto,
.address = (struct sockaddr *)&clp->cl_addr,
.addrsize = clp->cl_addrlen,
Expand Down
6 changes: 3 additions & 3 deletions fs/nfs/dns_resolve.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static int nfs_dns_show(struct seq_file *m, struct cache_detail *cd,
return 0;
}
item = container_of(h, struct nfs_dns_ent, h);
ttl = (long)item->h.expiry_time - (long)get_seconds();
ttl = item->h.expiry_time - seconds_since_boot();
if (ttl < 0)
ttl = 0;

Expand Down Expand Up @@ -239,7 +239,7 @@ static int nfs_dns_parse(struct cache_detail *cd, char *buf, int buflen)
ttl = get_expiry(&buf);
if (ttl == 0)
goto out;
key.h.expiry_time = ttl + get_seconds();
key.h.expiry_time = ttl + seconds_since_boot();

ret = -ENOMEM;
item = nfs_dns_lookup(cd, &key);
Expand Down Expand Up @@ -301,7 +301,7 @@ static int do_cache_lookup_nowait(struct cache_detail *cd,
goto out_err;
ret = -ETIMEDOUT;
if (!test_bit(CACHE_VALID, &(*item)->h.flags)
|| (*item)->h.expiry_time < get_seconds()
|| (*item)->h.expiry_time < seconds_since_boot()
|| cd->flush_time > (*item)->h.last_refresh)
goto out_put;
ret = -ENOENT;
Expand Down
2 changes: 2 additions & 0 deletions fs/nfs/mount_clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ int nfs_mount(struct nfs_mount_request *info)
.rpc_resp = &result,
};
struct rpc_create_args args = {
.net = &init_net,
.protocol = info->protocol,
.address = info->sap,
.addrsize = info->salen,
Expand Down Expand Up @@ -224,6 +225,7 @@ void nfs_umount(const struct nfs_mount_request *info)
.to_retries = 2,
};
struct rpc_create_args args = {
.net = &init_net,
.protocol = IPPROTO_UDP,
.address = info->sap,
.addrsize = info->salen,
Expand Down
12 changes: 12 additions & 0 deletions fs/nfsd/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ config NFSD

If unsure, say N.

config NFSD_DEPRECATED
bool "Include support for deprecated syscall interface to NFSD"
depends on NFSD
default y
help
The syscall interface to nfsd was obsoleted in 2.6.0 by a new
filesystem based interface. The old interface is due for removal
in 2.6.40. If you wish to remove the interface before then
say N.

In unsure, say Y.

config NFSD_V2_ACL
bool
depends on NFSD
Expand Down
Loading

0 comments on commit 4390110

Please sign in to comment.