Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1713021 > unrolled thread
| Started by | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| First post | 2017-08-16 16:50 +0200 |
| Last post | 2017-08-21 16:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] quota_v2: Delete an error message for a failed memory allocation in v2_read_file_info() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-16 16:50 +0200
Re: [PATCH] quota_v2: Delete an error message for a failed memory allocation in v2_read_file_info() Jan Kara <jack@suse.cz> - 2017-08-21 16:10 +0200
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2017-08-16 16:50 +0200 |
| Subject | [PATCH] quota_v2: Delete an error message for a failed memory allocation in v2_read_file_info() |
| Message-ID | <uf7NU-8hY-23@gated-at.bofh.it> |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 16 Aug 2017 16:16:30 +0200
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
fs/quota/quota_v2.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/quota/quota_v2.c b/fs/quota/quota_v2.c
index ca71bf881ad1..2259329616b7 100644
--- a/fs/quota/quota_v2.c
+++ b/fs/quota/quota_v2.c
@@ -109,11 +109,9 @@ static int v2_read_file_info(struct super_block *sb, int type)
return -1;
}
info->dqi_priv = kmalloc(sizeof(struct qtree_mem_dqinfo), GFP_NOFS);
- if (!info->dqi_priv) {
- printk(KERN_WARNING
- "Not enough memory for quota information structure.\n");
+ if (!info->dqi_priv)
return -ENOMEM;
- }
+
qinfo = info->dqi_priv;
if (version == 0) {
/* limits are stored as unsigned 32-bit data */
--
2.14.0
[toc] | [next] | [standalone]
| From | Jan Kara <jack@suse.cz> |
|---|---|
| Date | 2017-08-21 16:10 +0200 |
| Message-ID | <ugVyY-5o7-57@gated-at.bofh.it> |
| In reply to | #1713021 |
On Wed 16-08-17 16:41:00, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 16 Aug 2017 16:16:30 +0200
>
> Omit an extra message for a memory allocation failure in this function.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
OK, applied the patch to my tree. Thanks.
Honza
> ---
> fs/quota/quota_v2.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/fs/quota/quota_v2.c b/fs/quota/quota_v2.c
> index ca71bf881ad1..2259329616b7 100644
> --- a/fs/quota/quota_v2.c
> +++ b/fs/quota/quota_v2.c
> @@ -109,11 +109,9 @@ static int v2_read_file_info(struct super_block *sb, int type)
> return -1;
> }
> info->dqi_priv = kmalloc(sizeof(struct qtree_mem_dqinfo), GFP_NOFS);
> - if (!info->dqi_priv) {
> - printk(KERN_WARNING
> - "Not enough memory for quota information structure.\n");
> + if (!info->dqi_priv)
> return -ENOMEM;
> - }
> +
> qinfo = info->dqi_priv;
> if (version == 0) {
> /* limits are stored as unsigned 32-bit data */
> --
> 2.14.0
>
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web