[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1318928330-4498-1-git-send-email-gerlando.falauto@keymile.com>
Date: Tue, 18 Oct 2011 10:58:50 +0200
From: Gerlando Falauto <gerlando.falauto@...mile.com>
To: Steve French <sfrench@...ba.org>, linux-cifs@...r.kernel.org,
samba-technical@...ts.samba.org, linux-kernel@...r.kernel.org
Cc: Gerlando Falauto <gerlando.falauto@...mile.com>
Subject: [PATCH] CIFS: fix automount for DFS shares
Automounting directories are now invalidated by .d_revalidate()
so to be d_instantiate()d again with the right DCACHE_NEED_AUTOMOUNT
flag
Reviewed-by: Jeff Layton <jlayton@...ba.org>
Signed-off-by: Gerlando Falauto <gerlando.falauto@...mile.com>
---
fs/cifs/dir.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index 9ea65cf..ca3b571 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -637,8 +637,16 @@ cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd)
if (direntry->d_inode) {
if (cifs_revalidate_dentry(direntry))
return 0;
- else
+ else {
+ /*
+ * Forcibly invalidate automounting directory inodes
+ * (remote DFS directories) so to have them
+ * instantiated again for automount
+ */
+ if (IS_AUTOMOUNT(direntry->d_inode))
+ return 0;
return 1;
+ }
}
/*
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists