From: Edward Shishkin <edward.shishkin@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: hch@infradead.org,
Reiserfs mailing list <reiserfs-devel@vger.kernel.org>
Subject: [patch 1/2] reiser4: handling error returned by d_obtain_alias fixup
Date: Sat, 27 Dec 2008 02:33:20 +0300 [thread overview]
Message-ID: <495569C0.3030608@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: reiser4-d_obtain_alias-incorrect-handling-error-fixup.patch --]
[-- Type: text/x-patch, Size: 1933 bytes --]
. Fix up incorrect handling errors reterned by d_obtain_alias.
. Make quilt, checkpatch happy:
remove comment with "joke not for everyone".
Signed-off-by: Edward Shishkin<edward.shishkin@gmail.com>
---
linux-2.6.28-rc2-mm1/fs/reiser4/plugin/dir_plugin_common.c | 10 +---------
linux-2.6.28-rc2-mm1/fs/reiser4/plugin/file_plugin_common.c | 5 +----
2 files changed, 2 insertions(+), 13 deletions(-)
--- linux-2.6.28-rc2-mm1/fs/reiser4/plugin/dir_plugin_common.c.orig
+++ linux-2.6.28-rc2-mm1/fs/reiser4/plugin/dir_plugin_common.c
@@ -56,10 +56,7 @@ struct dentry *get_parent_common(struct
check_light_weight(parent, child);
reiser4_iget_complete(parent);
dentry = d_obtain_alias(parent);
- if (dentry == NULL) {
- iput(parent);
- dentry = ERR_PTR(RETERR(-ENOMEM));
- } else
+ if (!IS_ERR(dentry))
dentry->d_op = &get_super_private(s)->ops.dentry;
} else if (PTR_ERR(parent) == -ENOENT)
dentry = ERR_PTR(RETERR(-ESTALE));
@@ -353,11 +350,6 @@ int reiser4_dir_done_common(struct inode
result = reiser4_rem_entry_common(object, &goodby_dots, &entry);
reiser4_free_dentry_fsdata(&goodby_dots);
if (unlikely(result != 0 && result != -ENOMEM && result != -ENOENT))
- /* only worth a warning
-
- "values of \x0eB\x0f will give rise to dom!\n"
- -- v6src/s2/mv.c:89
- */
warning("nikita-2252", "Cannot remove dot of %lli: %i",
(unsigned long long)get_inode_oid(object), result);
return 0;
--- linux-2.6.28-rc2-mm1/fs/reiser4/plugin/file_plugin_common.c.orig
+++ linux-2.6.28-rc2-mm1/fs/reiser4/plugin/file_plugin_common.c
@@ -476,10 +476,7 @@ struct dentry *wire_get_common(struct su
if (!IS_ERR(inode)) {
reiser4_iget_complete(inode);
dentry = d_obtain_alias(inode);
- if (dentry == NULL) {
- iput(inode);
- dentry = ERR_PTR(-ENOMEM);
- } else
+ if (!IS_ERR(dentry))
dentry->d_op = &get_super_private(sb)->ops.dentry;
} else if (PTR_ERR(inode) == -ENOENT)
/*
reply other threads:[~2008-12-26 23:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=495569C0.3030608@gmail.com \
--to=edward.shishkin@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=hch@infradead.org \
--cc=reiserfs-devel@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.