The patch titled autofs4: cleanup active and expire lookup has been added to the -mm tree. Its filename is autofs4-cleanup-active-and-expire-lookup.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: autofs4: cleanup active and expire lookup From: Ian Kent <raven@xxxxxxxxxx> The lookup functions for active and expiring dentrys use parameters that can be easily obtained on entry so we change the call to to take just the dentry. This makes the subsequent change, to send all lookups to ->lookup(), a bit cleaner. Signed-off-by: Ian Kent <raven@xxxxxxxxxx> Cc: Sage Weil <sage@xxxxxxxxxxxx> Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx> Cc: Andreas Dilger <adilger@xxxxxxx> Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx> Cc: Yehuda Saheh <yehuda@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/autofs4/root.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff -puN fs/autofs4/root.c~autofs4-cleanup-active-and-expire-lookup fs/autofs4/root.c --- a/fs/autofs4/root.c~autofs4-cleanup-active-and-expire-lookup +++ a/fs/autofs4/root.c @@ -405,8 +405,11 @@ static const struct dentry_operations au .d_release = autofs4_dentry_release, }; -static struct dentry *autofs4_lookup_active(struct autofs_sb_info *sbi, struct dentry *parent, struct qstr *name) +static struct dentry *autofs4_lookup_active(struct dentry *dentry) { + struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb); + struct dentry *parent = dentry->d_parent; + struct qstr *name = &dentry->d_name; unsigned int len = name->len; unsigned int hash = name->hash; const unsigned char *str = name->name; @@ -457,8 +460,11 @@ next: return NULL; } -static struct dentry *autofs4_lookup_expiring(struct autofs_sb_info *sbi, struct dentry *parent, struct qstr *name) +static struct dentry *autofs4_lookup_expiring(struct dentry *dentry) { + struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb); + struct dentry *parent = dentry->d_parent; + struct qstr *name = &dentry->d_name; unsigned int len = name->len; unsigned int hash = name->hash; const unsigned char *str = name->name; @@ -530,7 +536,7 @@ static struct dentry *autofs4_lookup(str DPRINTK("pid = %u, pgrp = %u, catatonic = %d, oz_mode = %d", current->pid, task_pgrp_nr(current), sbi->catatonic, oz_mode); - active = autofs4_lookup_active(sbi, dentry->d_parent, &dentry->d_name); + active = autofs4_lookup_active(dentry); if (active) { dentry = active; ino = autofs4_dentry_ino(dentry); @@ -567,9 +573,7 @@ static struct dentry *autofs4_lookup(str if (!oz_mode) { mutex_unlock(&dir->i_mutex); - expiring = autofs4_lookup_expiring(sbi, - dentry->d_parent, - &dentry->d_name); + expiring = autofs4_lookup_expiring(dentry); if (expiring) { /* * If we are racing with expire the request might not _ Patches currently in -mm which might be from raven@xxxxxxxxxx are vfs-make-real_lookup-do-dentry-revalidation-with-i_mutex-held.patch vfs-clean-up-real_lookup.patch autofs4-use-helper-functions-for-active-list-handling.patch autofs4-use-helper-functions-for-expiring-list.patch autofs4-use-helper-function-for-need-mount-check.patch autofs4-use-autofs_info-for-pending-flag.patch autofs4-renamer-unhashed-to-active-in-autofs4_lookup.patch autofs4-cleanup-active-and-expire-lookup.patch autofs4-eliminate-d_unhashed-in-path-walk-checks.patch autofs4-rename-dentry-to-active-in-autofs4_lookup_active.patch autofs4-rename-dentry-to-expiring-in-autofs4_lookup_expiring.patch autofs4-always-use-lookup-for-lookup.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html