linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] autofs4 - fix symlink name allocation
@ 2008-07-01  9:25 Ian Kent
  2008-07-01  9:25 ` [PATCH 2/5] autofs4 - dont make expiring dentry negative fix Ian Kent
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ian Kent @ 2008-07-01  9:25 UTC (permalink / raw)
  To: Andrew Morton; +Cc: autofs mailing list, linux-fsdevel, Kernel Mailing List

The length of the symlink name has been moved but it needs to be
set before allocating space for it in the dentry info struct.
This corrects a mistake in a recent patch.

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

---

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


diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index 7f3ebf1..10add99 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -774,6 +774,7 @@ static int autofs4_dir_symlink(struct inode *dir,
 		list_del_init(&ino->active);
 	spin_unlock(&sbi->lookup_lock);
 
+	ino->size = strlen(symname);
 	cp = kmalloc(ino->size + 1, GFP_KERNEL);
 	if (!cp) {
 		if (!dentry->d_fsdata)
@@ -805,7 +806,6 @@ static int autofs4_dir_symlink(struct inode *dir,
 		atomic_inc(&p_ino->count);
 	ino->inode = inode;
 
-	ino->size = strlen(symname);
 	ino->u.symlink = cp;
 	dir->i_mtime = CURRENT_TIME;
 

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-07-01  9:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-01  9:25 [PATCH 1/5] autofs4 - fix symlink name allocation Ian Kent
2008-07-01  9:25 ` [PATCH 2/5] autofs4 - dont make expiring dentry negative fix Ian Kent
2008-07-01  9:26 ` [PATCH 3/5] autofs4 - fix waitq locking Ian Kent
2008-07-01  9:26 ` [PATCH 4/5] autofs4 - check kernel communication pipe is valid for write Ian Kent
2008-07-01  9:26 ` [PATCH 5/5] autofs4 - fix waitq memory leak Ian Kent

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).