On Fri, 2008-06-06 at 16:21 +0800, Ian Kent wrote: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); --
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| James Bottomley | Re: Announce: Linux-next (Or Andrew's dream :-)) |
| Trent Piepho | Re: [PATCH] fakephp: Allocate PCI resources before adding the device |
| Antonio Almeida | HTB accuracy for high speed |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
git: | |
