* [PATCH] ocfs2: Remove redundant conditional before iput
@ 2020-12-31 4:05 Yi Li
2020-12-31 4:33 ` Joseph Qi
0 siblings, 1 reply; 2+ messages in thread
From: Yi Li @ 2020-12-31 4:05 UTC (permalink / raw)
To: joseph.qi; +Cc: mark, yilikernel, ocfs2-devel, linux-kernel, Yi Li
iput handles NULL pointers gracefully, so there's no need to
check the pointer before the call.
Signed-off-by: Yi Li <yili@winhong.com>
---
fs/ocfs2/super.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 2febc76e9de7..079f8826993e 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -973,8 +973,6 @@ static void ocfs2_disable_quotas(struct ocfs2_super *osb)
* quota files */
dquot_disable(sb, type, DQUOT_USAGE_ENABLED |
DQUOT_LIMITS_ENABLED);
- if (!inode)
- continue;
iput(inode);
}
}
--
2.25.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ocfs2: Remove redundant conditional before iput
2020-12-31 4:05 [PATCH] ocfs2: Remove redundant conditional before iput Yi Li
@ 2020-12-31 4:33 ` Joseph Qi
0 siblings, 0 replies; 2+ messages in thread
From: Joseph Qi @ 2020-12-31 4:33 UTC (permalink / raw)
To: Yi Li, akpm; +Cc: mark, yilikernel, ocfs2-devel, linux-kernel
On 12/31/20 12:05 PM, Yi Li wrote:
> iput handles NULL pointers gracefully, so there's no need to
> check the pointer before the call.
>
> Signed-off-by: Yi Li <yili@winhong.com>
Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
> fs/ocfs2/super.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
> index 2febc76e9de7..079f8826993e 100644
> --- a/fs/ocfs2/super.c
> +++ b/fs/ocfs2/super.c
> @@ -973,8 +973,6 @@ static void ocfs2_disable_quotas(struct ocfs2_super *osb)
> * quota files */
> dquot_disable(sb, type, DQUOT_USAGE_ENABLED |
> DQUOT_LIMITS_ENABLED);
> - if (!inode)
> - continue;
> iput(inode);
> }
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-31 4:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-31 4:05 [PATCH] ocfs2: Remove redundant conditional before iput Yi Li
2020-12-31 4:33 ` Joseph Qi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).