linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: Jesper Krogh <jesper@krogh.cc>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Al Viro <viro@ZenIV.linux.org.uk>,
	Miklos Szeredi <miklos@szeredi.hu>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Jeff Moyer <jmoyer@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: Linux 2.6.26-rc4
Date: Fri, 06 Jun 2008 16:25:19 +0800	[thread overview]
Message-ID: <1212740720.3035.45.camel@raven.themaw.net> (raw)
In-Reply-To: <1212740486.3035.41.camel@raven.themaw.net>


On Fri, 2008-06-06 at 16:21 +0800, Ian Kent wrote:
> On Fri, 2008-06-06 at 08:23 +0200, Jesper Krogh wrote:
> > Hi.
> > 
> > This isn't a test of the proposed patch. I just got another variatioin 
> > of the problem in the log. (I've tried running the automount daemon both 
> > with and without the --ghost option) that is the only change I can see. 
> > Still 2.6.26-rc4..
> 
> Right.
> 
> Whether that would make a difference depends largely on your map
> configuration. If you have simple indirect or direct maps then then
> using the --ghost option (or just adding the "browse" option if you're
> using version 5) should prevent the code that turns the dentry negative
> from being executed at all. If you're using submounts in your map, or
> the "hosts" map or you have multi-mount entries in the maps then that
> code could still be executed.
> 

btw, I'm currently testing with these additional changes.
I don't think they will result in functional differences but it's best
we keep in sync.

autofs4 - leave rehash dentry positive fix

From: Ian Kent <raven@themaw.net>

Change ENOSPC to ENOMEM.
Make autofs4_init_ino() always set mode field.

Signed-off-by: Ian Kent <raven@themaw.net>
---

 fs/autofs4/inode.c |    2 +-
 fs/autofs4/root.c  |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)


diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c
index ec9a641..3221506 100644
--- a/fs/autofs4/inode.c
+++ b/fs/autofs4/inode.c
@@ -45,7 +45,6 @@ struct autofs_info *autofs4_init_ino(struct autofs_info *ino,
 
 	if (!reinit) {
 		ino->flags = 0;
-		ino->mode = mode;
 		ino->inode = NULL;
 		ino->dentry = NULL;
 		ino->size = 0;
@@ -53,6 +52,7 @@ struct autofs_info *autofs4_init_ino(struct autofs_info *ino,
 		atomic_set(&ino->count, 0);
 	}
 
+	ino->mode = mode;
 	ino->last_used = jiffies;
 
 	ino->sbi = sbi;
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index 6ce603b..f438e6b 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -713,13 +713,13 @@ static int autofs4_dir_symlink(struct inode *dir,
 
 	ino = autofs4_init_ino(ino, sbi, S_IFLNK | 0555);
 	if (!ino)
-		return -ENOSPC;
+		return -ENOMEM;
 
 	cp = kmalloc(ino->size + 1, GFP_KERNEL);
 	if (!cp) {
 		if (!dentry->d_fsdata)
 			kfree(ino);
-		return -ENOSPC;
+		return -ENOMEM;
 	}
 
 	strcpy(cp, symname);
@@ -733,7 +733,7 @@ static int autofs4_dir_symlink(struct inode *dir,
 			kfree(cp);
 			if (!dentry->d_fsdata)
 				kfree(ino);
-			return -ENOSPC;
+			return -ENOMEM;
 		}
 
 		d_add(dentry, inode);
@@ -866,7 +866,7 @@ static int autofs4_dir_mkdir(struct inode *dir, struct dentry *dentry, int mode)
 
 	ino = autofs4_init_ino(ino, sbi, S_IFDIR | 0555);
 	if (!ino)
-		return -ENOSPC;
+		return -ENOMEM;
 
 	inode = dentry->d_inode;
 	if (inode)
@@ -876,7 +876,7 @@ static int autofs4_dir_mkdir(struct inode *dir, struct dentry *dentry, int mode)
 		if (!inode) {
 			if (!dentry->d_fsdata)
 				kfree(ino);
-			return -ENOSPC;
+			return -ENOMEM;
 		}
 
 		d_add(dentry, inode);



  reply	other threads:[~2008-06-06  8:28 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <alpine.LFD.1.10.0805261127030.2958@woody.linux-foundation.org>
2008-06-03  9:49 ` Linux 2.6.26-rc4 Jesper Krogh
2008-06-03  9:57   ` Al Viro
2008-06-03 10:04     ` Jesper Krogh
2008-06-03 10:13       ` Miklos Szeredi
2008-06-03 10:37         ` Miklos Szeredi
2008-06-03 10:48           ` Al Viro
2008-06-03 13:31             ` Ian Kent
2008-06-03 13:32               ` Ian Kent
2008-06-03 10:40         ` Al Viro
2008-06-03 10:45           ` Miklos Szeredi
2008-06-03 10:52             ` Al Viro
2008-06-03 13:27               ` Ian Kent
2008-06-03 15:01                 ` Linus Torvalds
2008-06-03 16:07                   ` Ian Kent
2008-06-03 16:35                     ` Linus Torvalds
2008-06-03 16:41                       ` Al Viro
2008-06-03 16:50                         ` Al Viro
2008-06-03 17:28                           ` Ian Kent
2008-06-03 17:41                             ` Al Viro
2008-06-03 17:41                               ` Ian Kent
2008-06-03 17:50                                 ` Al Viro
2008-06-03 17:49                                   ` Ian Kent
2008-06-03 16:59                         ` Linus Torvalds
2008-06-03 17:30                           ` Ian Kent
2008-06-03 17:13                       ` Ian Kent
2008-06-03 17:30                         ` Al Viro
2008-06-03 17:38                           ` Ian Kent
2008-06-03 17:46                           ` Jeff Moyer
2008-06-03 19:18                             ` Al Viro
2008-06-03 19:53                               ` Jeff Moyer
2008-06-03 23:00                                 ` Al Viro
2008-06-04  2:42                                   ` Ian Kent
2008-06-04  5:34                                     ` Miklos Szeredi
2008-06-04  5:41                                       ` Ian Kent
2008-06-10  4:57                                     ` Ian Kent
2008-06-10  6:28                                       ` Jesper Krogh
2008-06-10  6:40                                         ` Ian Kent
2008-06-10  9:09                                           ` Ian Kent
2008-06-12  3:03                                           ` Ian Kent
2008-06-12  7:02                                             ` Jesper Krogh
2008-06-12 11:21                                               ` Ian Kent
2008-06-12 11:19                                             ` Ian Kent
2008-06-04  1:36                               ` Ian Kent
2008-06-05  7:31                   ` Ian Kent
2008-06-05 21:29                     ` Linus Torvalds
2008-06-05 21:34                       ` Jesper Krogh
2008-06-06  2:39                       ` Ian Kent
2008-06-05 22:30                     ` Andrew Morton
2008-06-06  2:47                       ` Ian Kent
2008-06-27  4:18                       ` Ian Kent
2008-06-06  6:23                     ` Jesper Krogh
2008-06-06  8:21                       ` Ian Kent
2008-06-06  8:25                         ` Ian Kent [this message]
2008-06-03 10:35     ` Al Viro

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=1212740720.3035.45.camel@raven.themaw.net \
    --to=raven@themaw.net \
    --cc=akpm@linux-foundation.org \
    --cc=jesper@krogh.cc \
    --cc=jmoyer@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@ZenIV.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).