minor patch for 2.1.55 fs/dcache

Bill Hawes (whawes@star.net)
Fri, 12 Sep 1997 17:29:54 -0400


This is a multi-part message in MIME format.
--------------FA829826CA97B56FF2D866BA
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

The attached patch checks the memory allocation in d_alloc_root, and
fills in the correct hash for a root qstr.

Regards,
Bill
--------------FA829826CA97B56FF2D866BA
Content-Type: text/plain; charset=us-ascii; name="dcache_55-patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="dcache_55-patch"

--- fs/dcache.c.old Sat Sep 6 16:03:33 1997
+++ fs/dcache.c Fri Sep 12 09:39:08 1997
@@ -211,7 +232,9 @@

if (root_inode) {
- res = d_alloc(NULL, &(const struct qstr) { "/", 1, 0 });
- res->d_parent = res;
- d_instantiate(res, root_inode);
+ res = d_alloc(NULL, &(const struct qstr) { "/", 1, 47 });
+ if (res) {
+ res->d_parent = res;
+ d_instantiate(res, root_inode);
+ }
}
return res;
@@ -345,5 +368,5 @@

/*
- * We cannibalize "newdentry" when moving dentry on top of it,
+ * We cannibalize "target" when moving dentry on top of it,
* because it's going to be thrown away anyway. We could be more
* polite about it, though.

--------------FA829826CA97B56FF2D866BA--