Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Date | Mon, 20 Jan 2003 02:00:07 +0100 | Subject | Re: problems with nfs-server in 2.5 bk as of 030115 | From | Trond Myklebust <> |
| |
>>>>> " " == 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; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |