[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1365369695-8340-2-git-send-email-khoroshilov@ispras.ru>
Date: Mon, 8 Apr 2013 01:21:35 +0400
From: Alexey Khoroshilov <khoroshilov@...ras.ru>
To: Vyacheslav Dubeyko <slava@...eyko.com>,
Hin-Tak Leung <htl10@...rs.sourceforge.net>
Cc: Alexey Khoroshilov <khoroshilov@...ras.ru>,
Al Viro <viro@...iv.linux.org.uk>,
Artem Bityutskiy <artem.bityutskiy@...ux.intel.com>,
Christoph Hellwig <hch@....de>, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, ldv-project@...uxtesting.org
Subject: [PATCH 2/2] hfsplus: add printk to log allocation failure in hfs_find_init()
Add printk to log allocation failure in hfs_find_init(),
"so that there is a sign in dmesg when the error condition is triggered".
(per Hin-Tak Leung request)
Signed-off-by: Alexey Khoroshilov <khoroshilov@...ras.ru>
---
fs/hfsplus/bfind.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/hfsplus/bfind.c b/fs/hfsplus/bfind.c
index d73c98d..067ddb5 100644
--- a/fs/hfsplus/bfind.c
+++ b/fs/hfsplus/bfind.c
@@ -18,8 +18,10 @@ int hfs_find_init(struct hfs_btree *tree, struct hfs_find_data *fd)
fd->tree = tree;
fd->bnode = NULL;
ptr = kmalloc(tree->max_key_len * 2 + 4, GFP_KERNEL);
- if (!ptr)
+ if (!ptr) {
+ printk(KERN_ERR "hfs: allocation failed in hfs_find_init()\n");
return -ENOMEM;
+ }
fd->search_key = ptr;
fd->key = ptr + tree->max_key_len + 2;
dprint(DBG_BNODE_REFS, "find_init: %d (%p)\n",
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists