linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] ext4: checking for NULL instead of IS_ERR
@ 2016-01-06 10:04 Dan Carpenter
  2016-01-06 13:05 ` Jan Kara
  2016-01-08 20:52 ` Theodore Ts'o
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2016-01-06 10:04 UTC (permalink / raw)
  To: Theodore Ts'o, Li Xi; +Cc: Andreas Dilger, linux-ext4, kernel-janitors

The dqget() function returns error pointers on error, it doesn't return
NULL.

Fixes: 76481d7a60a4 ('ext4: add project quota support')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 50b2207..103a7a3 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4844,8 +4844,8 @@ static int ext4_statfs_project(struct super_block *sb,
 
 	qid = make_kqid_projid(projid);
 	dquot = dqget(sb, qid);
-	if (!dquot)
-		return -ESRCH;
+	if (IS_ERR(dquot))
+		return PTR_ERR(dquot);
 	spin_lock(&dq_data_lock);
 
 	limit = (dquot->dq_dqb.dqb_bsoftlimit ?

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-01-08 20:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-06 10:04 [patch] ext4: checking for NULL instead of IS_ERR Dan Carpenter
2016-01-06 13:05 ` Jan Kara
2016-01-08 20:52 ` Theodore Ts'o

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).