This is a note to let you know that I've just added the patch titled
vfs: d_obtain_alias() needs to use "/" as default name.
to the 3.7-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
vfs-d_obtain_alias-needs-to-use-as-default-name.patch
and it can be found in the queue-3.7 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From b911a6bdeef5848c468597d040e3407e0aee04ce Mon Sep 17 00:00:00 2001
From: NeilBrown <[email protected]>
Date: Thu, 8 Nov 2012 16:09:37 -0800
Subject: vfs: d_obtain_alias() needs to use "/" as default name.
From: NeilBrown <[email protected]>
commit b911a6bdeef5848c468597d040e3407e0aee04ce upstream.
NFS appears to use d_obtain_alias() to create the root dentry rather than
d_make_root. This can cause 'prepend_path()' to complain that the root
has a weird name if an NFS filesystem is lazily unmounted. e.g. if
"/mnt" is an NFS mount then
{ cd /mnt; umount -l /mnt ; ls -l /proc/self/cwd; }
will cause a WARN message like
WARNING: at /home/git/linux/fs/dcache.c:2624 prepend_path+0x1d7/0x1e0()
...
Root dentry has weird name <>
to appear in kernel logs.
So change d_obtain_alias() to use "/" rather than "" as the anonymous
name.
Signed-off-by: NeilBrown <[email protected]>
Cc: Trond Myklebust <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
fs/dcache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1583,7 +1583,7 @@ EXPORT_SYMBOL(d_find_any_alias);
*/
struct dentry *d_obtain_alias(struct inode *inode)
{
- static const struct qstr anonstring = { .name = "" };
+ static const struct qstr anonstring = QSTR_INIT("/", 1);
struct dentry *tmp;
struct dentry *res;
Patches currently in stable-queue which might be from [email protected] are
queue-3.7/nfsd-avoid-permission-checks-on-exclusive_create-replay.patch
queue-3.7/nfs-don-t-use-setpageerror-in-the-nfs-writeback-code.patch
queue-3.7/nfs-avoid-null-dereference-in-nfs_destroy_server.patch
queue-3.7/vfs-d_obtain_alias-needs-to-use-as-default-name.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html