From: Joel Becker <Joel.Becker@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] a patch for ocfs2_link
Date: Thu Aug 31 20:06:35 2006 [thread overview]
Message-ID: <20060901030633.GX7715@ca-server1.us.oracle.com> (raw)
In-Reply-To: <44F79A94.3040101@oracle.com>
On Fri, Sep 01, 2006 at 10:27:32AM +0800, Tiger Yang wrote:
> diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
> index 0673862..719a8d2 100644
> --- a/fs/ocfs2/namei.c
> +++ b/fs/ocfs2/namei.c
> @@ -643,11 +643,6 @@ static int ocfs2_link(struct dentry *old
> goto bail;
> }
>
> - if (inode->i_nlink >= OCFS2_LINK_MAX) {
> - err = -EMLINK;
> - goto bail;
> - }
> -
Why is this redundant? Is someone doing it for us? I see we
check the fe->i_links_count below, but that's after the expense of a
cluster lock. Don't we save some effort here?
> @@ -661,6 +656,11 @@ static int ocfs2_link(struct dentry *old
> goto bail;
> }
>
> + if (!dir->i_nlink) {
> + err = -ENOENT;
> + goto bail;
> + }
> +
And what does this do? If a directory...oh, wait, is this to
check for a directory that's going away? Can this actually happen? I'd
think that the VFS would protect it.
Joel
--
"Well-timed silence hath more eloquence than speech."
- Martin Fraquhar Tupper
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
next prev parent reply other threads:[~2006-08-31 20:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-31 19:27 [Ocfs2-devel] a patch for ocfs2_link Tiger Yang
2006-08-31 20:06 ` Joel Becker [this message]
2006-08-31 20:26 ` Mark Fasheh
2006-08-31 20:34 ` [Ocfs2-devel] " Mark Fasheh
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=20060901030633.GX7715@ca-server1.us.oracle.com \
--to=joel.becker@oracle.com \
--cc=ocfs2-devel@oss.oracle.com \
/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.