From: Jerome de Vivie <jerome.devivie@free.fr>
To: linux-fsdevel@vger.kernel.org
Subject: Does struct qstr->name should be terminated ?
Date: Tue, 23 Mar 2004 11:56:01 +0100 [thread overview]
Message-ID: <406017C1.4080005@free.fr> (raw)
I've work with "struct qstr" for a while without bothering with the last
caracter: qstr->name[qstr->len]. I get oops from my module but after
investigation, i found lines in fs/namei.c that are using this caracter:
In do_rename:
/* unless the source is a directory trailing slashes give
-ENOTDIR */
if (!S_ISDIR(old_dentry->d_inode->i_mode)) {
error = -ENOTDIR;
if (oldnd.last.name[oldnd.last.len])
goto exit4;
if (newnd.last.name[newnd.last.len])
goto exit4;
}
So, do i need to initialize this caracter when allocating new qstr ? Is
this caracter is used in other place in the VFS ?
regards,
j.
next reply other threads:[~2004-03-23 11:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-23 10:56 Jerome de Vivie [this message]
2004-03-24 9:09 ` Does struct qstr->name should be terminated ? Jan Hudec
2004-03-24 13:05 ` Matthew Wilcox
2004-03-24 17:09 ` Bryan Henderson
2004-03-25 0:09 ` Jerome de Vivie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=406017C1.4080005@free.fr \
--to=jerome.devivie@free.fr \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.