--- fs/namei.c | 5 +---- include/linux/namei.h | 7 +++++++ 2 files changed, 8 insertions(+), 4 deletions(-) --- linux-2.6.5-7.282.orig/fs/namei.c +++ linux-2.6.5-7.282/fs/namei.c @@ -2369,7 +2369,6 @@ static inline int __vfs_follow_link(struct nameidata *nd, const char *link) { int res = 0; - struct lookup_intent it = nd->intent; char *name; if (IS_ERR(link)) @@ -2382,9 +2381,7 @@ __vfs_follow_link(struct nameidata *nd, goto out; } - intent_init(&nd->intent, it.it_op); - nd->intent.it_flags = it.it_flags; - nd->intent.it_create_mode = it.it_create_mode; + intent_reset_fs_part(&nd->intent); res = link_path_walk(link, nd); out: if (current->link_count || res || nd->last_type!=LAST_NORM) --- linux-2.6.5-7.282.orig/include/linux/namei.h +++ linux-2.6.5-7.282/include/linux/namei.h @@ -37,6 +37,13 @@ struct lookup_intent { } d; }; +static inline void intent_reset_fs_part(struct lookup_intent *it) +{ + memset(&it->d, 0, sizeof(it->d)); + it->it_magic = INTENT_MAGIC; + it->it_op_release = NULL; +} + static inline void intent_init(struct lookup_intent *it, int op) { memset(it, 0, sizeof(*it));