From: Alex Zarochentsev <zam@namesys.com>
To: Andrew Morton <akpm@osdl.org>, viro@parcelfarce.linux.theplanet.co.uk
Cc: linux-kernel@vger.kernel.org, reiserfs-list@namesys.com
Subject: [PATCH] use S_ISDIR() in link_path_walk() to decide whether the last path component is a directory
Date: Mon, 13 Sep 2004 11:49:22 +0400 [thread overview]
Message-ID: <20040913074921.GA2252@backtop.namesys.com> (raw)
Hi,
This patch does not allow open(name, O_DIRECTORY) to be successful for
non-directories in reiser4. It replaces ->i_op->lookup != NULL "is dir" check
for the last path component by explicit S_ISDIR(->i_mode) check.
Regardless to reiser4, S_ISDIR() looks more clear there.
Thanks in advance.
===== fs/namei.c 1.104 vs edited =====
--- 1.104/fs/namei.c Tue Aug 10 16:59:38 2004
+++ edited/fs/namei.c Sun Sep 12 11:00:18 2004
@@ -816,7 +816,7 @@
break;
if (lookup_flags & LOOKUP_DIRECTORY) {
err = -ENOTDIR;
- if (!inode->i_op || !inode->i_op->lookup)
+ if (!S_ISDIR(inode->i_mode))
break;
}
goto return_base;
next reply other threads:[~2004-09-13 7:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-13 7:49 Alex Zarochentsev [this message]
2004-09-13 15:43 ` [PATCH] use S_ISDIR() in link_path_walk() to decide whether the last path component is a directory viro
-- strict thread matches above, loose matches on Subject: below --
2004-09-13 21:34 David Dabbs
2004-09-13 22:26 ` viro
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=20040913074921.GA2252@backtop.namesys.com \
--to=zam@namesys.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=reiserfs-list@namesys.com \
--cc=viro@parcelfarce.linux.theplanet.co.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox