Commit 6a53edc5 authored by Linus Torvalds's avatar Linus Torvalds

Avoid using the gcc-ism of creating an anonymous structure directly

by having a cast followed by an initializer. It seems even gcc can't
do it right anyway in some versions (as reported by Jens Axboe).
parent ef67c46c
...@@ -784,7 +784,8 @@ struct dentry * d_alloc_root(struct inode * root_inode) ...@@ -784,7 +784,8 @@ struct dentry * d_alloc_root(struct inode * root_inode)
struct dentry *res = NULL; struct dentry *res = NULL;
if (root_inode) { if (root_inode) {
res = d_alloc(NULL, &(const struct qstr) { "/", 1, 0 }); static const struct qstr name = { .name = "/", .len = 1, .hash = 0 };
res = d_alloc(NULL, &name);
if (res) { if (res) {
res->d_sb = root_inode->i_sb; res->d_sb = root_inode->i_sb;
res->d_parent = res; res->d_parent = res;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment