mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Martin Josefsson <gandalf@wlug.westbo.se>
Cc: linux-kernel@vger.kernel.org
Subject: Re: problems with nfs-server in 2.5 bk as of 030115
Date: Mon, 20 Jan 2003 02:00:07 +0100	[thread overview]
Message-ID: <15915.18967.933150.49658@charged.uio.no> (raw)
In-Reply-To: <1043021842.679.1.camel@tux.rsn.bth.se>

>>>>> " " == Martin Josefsson <gandalf@wlug.westbo.se> writes:

     > With two added ; the patch compiled and produced this output:

     > Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
     > rpc_destroy_client: rpc_rmdir(/portmap/clnteb10c63c) failed
     > with error -39 RPC: Couldn't create pipefs entry
     > /portmap/clnteb10c63c, error -17 RPC: Couldn't create pipefs
     > entry /portmap/clnteb10c63c, error -17 RPC: Couldn't create
     > pipefs entry /portmap/clnteb10c63c, error -17

Hmm... Does the following help?

Cheers,
  Trond

--- linux-2.5.59-00-fix/net/sunrpc/rpc_pipe.c.orig	2003-01-14 16:29:23.000000000 +0100
+++ linux-2.5.59-00-fix/net/sunrpc/rpc_pipe.c	2003-01-20 01:38:59.000000000 +0100
@@ -476,15 +476,16 @@
  * FIXME: This probably has races.
  */
 static void
-rpc_depopulate(struct dentry *dir)
+rpc_depopulate(struct dentry *parent)
 {
+	struct inode *dir = parent->d_inode;
 	LIST_HEAD(head);
 	struct list_head *pos, *next;
 	struct dentry *dentry;
 
-	down(&dir->d_inode->i_sem);
+	down(&dir->i_sem);
 	spin_lock(&dcache_lock);
-	list_for_each_safe(pos, next, &dir->d_subdirs) {
+	list_for_each_safe(pos, next, &parent->d_subdirs) {
 		dentry = list_entry(pos, struct dentry, d_child);
 		if (!d_unhashed(dentry)) {
 			dget_locked(dentry);
@@ -498,32 +499,34 @@
 		list_del_init(&dentry->d_hash);
 		if (dentry->d_inode) {
 			rpc_inode_setowner(dentry->d_inode, NULL);
-			simple_unlink(dir->d_inode, dentry);
+			simple_unlink(dir, dentry);
 		}
 		dput(dentry);
 	}
-	up(&dir->d_inode->i_sem);
+	up(&dir->i_sem);
 }
 
 static int
-rpc_populate(struct dentry *dir,
+rpc_populate(struct dentry *parent,
 		struct rpc_filelist *files,
 		int start, int eof)
 {
-	void *private = RPC_I(dir->d_inode)->private;
+	struct inode *inode, *dir = parent->d_inode;
+	void *private = RPC_I(dir)->private;
 	struct qstr name;
 	struct dentry *dentry;
-	struct inode *inode;
 	int mode, i;
+
+	down(&dir->i_sem);
 	for (i = start; i < eof; i++) {
 		name.name = files[i].name;
 		name.len = strlen(name.name);
 		name.hash = full_name_hash(name.name, name.len);
-		dentry = d_alloc(dir, &name);
+		dentry = d_alloc(parent, &name);
 		if (!dentry)
 			goto out_bad;
 		mode = files[i].mode;
-		inode = rpc_get_inode(dir->d_inode->i_sb, mode);
+		inode = rpc_get_inode(dir->i_sb, mode);
 		if (!inode) {
 			dput(dentry);
 			goto out_bad;
@@ -534,13 +537,15 @@
 		if (private)
 			rpc_inode_setowner(inode, private);
 		if (S_ISDIR(mode))
-			dir->d_inode->i_nlink++;
+			dir->i_nlink++;
 		d_add(dentry, inode);
 	}
+	up(&dir->i_sem);
 	return 0;
 out_bad:
+	up(&dir->i_sem);
 	printk(KERN_WARNING "%s: %s failed to populate directory %s\n",
-			__FILE__, __FUNCTION__, dir->d_name.name);
+			__FILE__, __FUNCTION__, parent->d_name.name);
 	return -ENOMEM;
 }
 

  reply	other threads:[~2003-01-20  0:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-19 21:39 Martin Josefsson
2003-01-19 22:05 ` Trond Myklebust
2003-01-19 22:50   ` Martin Josefsson
2003-01-19 23:22     ` Martin Josefsson
2003-01-19 23:24     ` Trond Myklebust
2003-01-20  0:17       ` Martin Josefsson
2003-01-20  1:00         ` Trond Myklebust [this message]
2003-01-20  1:17           ` Martin Josefsson
2003-01-20  1:20             ` Trond Myklebust
2003-01-20  1:26               ` Martin Josefsson
2003-01-20  1:34 ` Trond Myklebust
2003-01-20  1:50   ` Martin Josefsson
2003-01-20  2:01     ` Trond Myklebust
2003-01-20  2:17       ` Martin Josefsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15915.18967.933150.49658@charged.uio.no \
    --to=trond.myklebust@fys.uio.no \
    --cc=gandalf@wlug.westbo.se \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®