summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-10-09 00:00:47 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-10-09 00:00:47 +0000
commitd6434e1042f3b0a6dfe1b1f615af369486f9b1fa (patch)
treee2be02f33984c48ec019c654051d27964e42c441 /fs/nfs
parent609d1e803baf519487233b765eb487f9ec227a18 (diff)
Merge with 2.3.19.
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/dir.c2
-rw-r--r--fs/nfs/nfsroot.c25
-rw-r--r--fs/nfs/read.c2
-rw-r--r--fs/nfs/write.c2
4 files changed, 17 insertions, 14 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 31d76e5c6..6b52b2d54 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -601,6 +601,8 @@ static int nfs_lookup_revalidate(struct dentry * dentry, int flags)
/* Filehandle matches? */
if (memcmp(dentry->d_fsdata, &fhandle, sizeof(struct nfs_fh))) {
+ if (!list_empty(&dentry->d_subdirs))
+ shrink_dcache_parent(dentry);
if (dentry->d_count < 2)
goto out_bad;
}
diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c
index 65d3f76a2..d9a423f16 100644
--- a/fs/nfs/nfsroot.c
+++ b/fs/nfs/nfsroot.c
@@ -154,7 +154,7 @@ static struct nfs_bool_opts {
* need to have root_server_addr set _before_ IPConfig gets called as it
* can override it.
*/
-__initfunc(static void root_nfs_parse_addr(char *name))
+static void __init root_nfs_parse_addr(char *name)
{
int octets = 0;
char *cp, *cq;
@@ -183,7 +183,7 @@ __initfunc(static void root_nfs_parse_addr(char *name))
/*
* Parse option string.
*/
-__initfunc(static void root_nfs_parse(char *name, char *buf))
+static void __init root_nfs_parse(char *name, char *buf)
{
char *options, *val, *cp;
@@ -220,7 +220,7 @@ __initfunc(static void root_nfs_parse(char *name, char *buf))
/*
* Prepare the NFS data structure and parse all options.
*/
-__initfunc(static int root_nfs_name(char *name))
+static int __init root_nfs_name(char *name)
{
char buf[NFS_MAXPATHLEN];
char *cp;
@@ -261,7 +261,7 @@ __initfunc(static int root_nfs_name(char *name))
/*
* Get NFS server address.
*/
-__initfunc(static int root_nfs_addr(void))
+static int __init root_nfs_addr(void)
{
if ((servaddr = root_server_addr) == INADDR_NONE) {
printk(KERN_ERR "Root-NFS: No NFS server available, giving up.\n");
@@ -277,7 +277,7 @@ __initfunc(static int root_nfs_addr(void))
* Tell the user what's going on.
*/
#ifdef NFSROOT_DEBUG
-__initfunc(static void root_nfs_print(void))
+static void __init root_nfs_print(void)
{
printk(KERN_NOTICE "Root-NFS: Mounting %s on server %s as root\n",
nfs_path, nfs_data.hostname);
@@ -292,7 +292,7 @@ __initfunc(static void root_nfs_print(void))
#endif
-__initfunc(int root_nfs_init(void))
+int __init root_nfs_init(void)
{
#ifdef NFSROOT_DEBUG
nfs_debug |= NFSDBG_ROOT;
@@ -320,7 +320,7 @@ __initfunc(int root_nfs_init(void))
* Parse NFS server and directory information passed on the kernel
* command line.
*/
-__initfunc(void nfs_root_setup(char *line, int *ints))
+void __init nfs_root_setup(char *line)
{
ROOT_DEV = MKDEV(UNNAMED_MAJOR, 255);
if (line[0] == '/' || line[0] == ',' || (line[0] >= '0' && line[0] <= '9')) {
@@ -335,6 +335,7 @@ __initfunc(void nfs_root_setup(char *line, int *ints))
root_nfs_parse_addr(nfs_root_name);
}
+__setup("nfsroot=", nfs_root_setup);
/***************************************************************************
@@ -356,7 +357,7 @@ set_sockaddr(struct sockaddr_in *sin, __u32 addr, __u16 port)
/*
* Query server portmapper for the port of a daemon program.
*/
-__initfunc(static int root_nfs_getport(int program, int version))
+static int __init root_nfs_getport(int program, int version)
{
struct sockaddr_in sin;
@@ -372,7 +373,7 @@ __initfunc(static int root_nfs_getport(int program, int version))
* by the user. Use defaults if portmapper is not available.
* XXX: Is there any nfs server with no portmapper?
*/
-__initfunc(static int root_nfs_ports(void))
+static int __init root_nfs_ports(void)
{
int port;
@@ -403,7 +404,7 @@ __initfunc(static int root_nfs_ports(void))
* Get a file handle from the server for the directory which is to be
* mounted.
*/
-__initfunc(static int root_nfs_get_handle(void))
+static int __init root_nfs_get_handle(void)
{
struct sockaddr_in sin;
int status;
@@ -421,7 +422,7 @@ __initfunc(static int root_nfs_get_handle(void))
/*
* Now actually mount the given directory.
*/
-__initfunc(static int root_nfs_do_mount(struct super_block *sb))
+static int __init root_nfs_do_mount(struct super_block *sb)
{
/* Pass the server address to NFS */
set_sockaddr((struct sockaddr_in *) &nfs_data.addr, servaddr, nfs_port);
@@ -437,7 +438,7 @@ __initfunc(static int root_nfs_do_mount(struct super_block *sb))
* Get the NFS port numbers and file handle, and then read the super-
* block for mounting.
*/
-__initfunc(int nfs_root_mount(struct super_block *sb))
+int __init nfs_root_mount(struct super_block *sb)
{
if (root_nfs_init() < 0
|| root_nfs_ports() < 0
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index 899b62c82..a7960c1e0 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -152,7 +152,7 @@ nfs_readpage_result(struct rpc_task *task)
fail++;
dprintk("NFS: %d successful reads, %d failures\n", succ, fail);
}
- page->owner = (int)current; // HACK, FIXME, will go away.
+ page->owner = current; // HACK, FIXME, will go away.
UnlockPage(page);
free_page(address);
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 77c1db091..561e8450c 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -392,7 +392,7 @@ wait_on_write_request(struct nfs_wreq *req)
rpc_clnt_sigmask(clnt, &oldmask);
add_wait_queue(&req->wb_wait, &wait);
for (;;) {
- current->state = TASK_INTERRUPTIBLE;
+ set_current_state(TASK_INTERRUPTIBLE);
retval = 0;
if (req->wb_flags & NFS_WRITE_COMPLETE)
break;