From: Rusty Russell <rusty@rustcorp.com.au>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 1/1] GFS2: Replace PTR_RET with PTR_ERR_OR_ZERO
Date: Tue, 16 Jul 2013 16:05:56 +0930 [thread overview]
Message-ID: <87mwpnyptf.fsf@rustcorp.com.au> (raw)
In-Reply-To: <1373908685.2730.46.camel@menhir>
Steven Whitehouse <swhiteho@redhat.com> writes:
> Hi,
>
> On Mon, 2013-07-15 at 16:58 +0530, Sachin Kamat wrote:
>> PTR_RET is now deprecated. Use PTR_ERR_OR_ZERO instead.
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>> ---
>> Compile tested and based on the following tree:
>> git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux.git (PTR_RET)
>>
>> Dependent on [1]
>> [1] http://lkml.indiana.edu/hypermail/linux/kernel/1306.2/00010.html
>> ---
>> fs/gfs2/inode.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
>> index bbb2715..a186ebd 100644
>> --- a/fs/gfs2/inode.c
>> +++ b/fs/gfs2/inode.c
>> @@ -19,6 +19,7 @@
>> #include <linux/crc32.h>
>> #include <linux/fiemap.h>
>> #include <linux/security.h>
>> +#include <linux/err.h>
>> #include <asm/uaccess.h>
>>
>> #include "gfs2.h"
>> @@ -594,7 +595,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
>> }
>> gfs2_glock_dq_uninit(ghs);
>> if (IS_ERR(d))
>> - return PTR_RET(d);
>> + return PTR_ERR_OR_ZERO(d);
>
> I'm not sure I follow what this is supposed to be doing... what is the
> reason for this change? This macro/function doesn't seem to be defined
> in the current kernel, so I assume that it is "coming soon" but the
> thread pointed to above wasn't very enlightening,
It's a clarification rename.
But this fix is wrong, it should just be changed to PTR_ERR(d). It
never needed PTR_RET() in the first place.
Thanks,
Rusty.
next prev parent reply other threads:[~2013-07-16 6:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-15 11:28 [Cluster-devel] [PATCH 1/1] GFS2: Replace PTR_RET with PTR_ERR_OR_ZERO Sachin Kamat
2013-07-15 17:18 ` Steven Whitehouse
2013-07-16 6:35 ` Rusty Russell [this message]
2013-07-17 7:41 ` Steven Whitehouse
2013-07-22 1:42 ` Rusty Russell
2013-07-16 8:28 ` Sachin Kamat
2013-07-16 9:06 ` Steven Whitehouse
2013-07-16 9:25 ` Sachin Kamat
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=87mwpnyptf.fsf@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
/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.