linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: jack@suse.com, linux-kernel@vger.kernel.org, trivial@kernel.org
Subject: [PATCH] udf: use common error code for unclean filesystem
Date: Sun, 26 Jul 2020 09:58:28 +0200	[thread overview]
Message-ID: <20200726075828.GA26460@duo.ucw.cz> (raw)

[-- Attachment #1: Type: text/plain, Size: 836 bytes --]


Use common error code for unclean filesystem, and warn when
incosistency is detected.

Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>

diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index adaba8e8b326..8e74c7b5b8d0 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -1395,7 +1395,10 @@ static int udf_read_inode(struct inode *inode, bool hidden_inode)
 	if (iinfo->i_alloc_type != ICBTAG_FLAG_AD_SHORT &&
 	    iinfo->i_alloc_type != ICBTAG_FLAG_AD_LONG &&
 	    iinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB) {
-		ret = -EIO;
+		ret = -EUCLEAN;
+		udf_err(inode->i_sb, "invalid allocation type: %u\n",
+			iinfo->i_alloc_type);
+
 		goto out;
 	}
 	iinfo->i_unique = 0;

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

             reply	other threads:[~2020-07-26  7:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-26  7:58 Pavel Machek [this message]
2020-07-27 12:12 ` [PATCH] udf: use common error code for unclean filesystem Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200726075828.GA26460@duo.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=jack@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).