Patchwork [v2] ubifs: avoid kernel error if ubifs superblock read fails

login
register
mail settings
Submitter Steffen Sledz
Date Sept. 27, 2010, 12:20 p.m.
Message ID <1285590026-11629-1-git-send-email-sledz@dresearch.de>
Download mbox | patch
Permalink /patch/65838/
State New
Headers show

Comments

Steffen Sledz - Sept. 27, 2010, 12:20 p.m.
* .get_sb is called on mounts with automatic fs detection too, so this
  function should print an error if it cannot read the superblock in
  debug mode only
  (new behaviour conforms the other fs types)

Signed-off-by: Steffen Sledz <sledz@dresearch.de>
---
 fs/ubifs/super.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Artem Bityutskiy - Sept. 28, 2010, 6:49 a.m.
On Mon, 2010-09-27 at 14:20 +0200, Steffen Sledz wrote:
> * .get_sb is called on mounts with automatic fs detection too, so this
>   function should print an error if it cannot read the superblock in
>   debug mode only
>   (new behaviour conforms the other fs types)
> 
> Signed-off-by: Steffen Sledz <sledz@dresearch.de>

Pushed to ubifs-2.6.git, thanks!

Patch

diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 4e5bf3f..bb6ed5d 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -2054,8 +2054,8 @@  static int ubifs_get_sb(struct file_system_type *fs_type, int flags,
 	 */
 	ubi = open_ubi(name, UBI_READONLY);
 	if (IS_ERR(ubi)) {
-		ubifs_err("cannot open \"%s\", error %d",
-			  name, (int)PTR_ERR(ubi));
+		dbg_err("cannot open \"%s\", error %d",
+			name, (int)PTR_ERR(ubi));
 		return PTR_ERR(ubi);
 	}
 	ubi_get_volume_info(ubi, &vi);