linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: linux-fsdevel@vger.kernel.org
Cc: Jan Kara <jack@suse.cz>
Subject: [PATCH] udf: Some type fixes and cleanups
Date: Wed, 11 Mar 2009 17:07:43 +0100	[thread overview]
Message-ID: <1236787663-1067-1-git-send-email-jack@suse.cz> (raw)

Make udf_check_valid() return 1 if the validity check passed and 0 otherwise.
So far it was the other way around which was a bit confusing. Also make
udf_vrs() return loff_t which is really the type it should return (not int).

Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/udf/super.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

 Sending for review. The patch is merged in UDF tree.

									Honza

diff --git a/fs/udf/super.c b/fs/udf/super.c
index f8fece4..f4ef556 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -83,8 +83,6 @@ static int udf_fill_super(struct super_block *, void *, int);
 static void udf_put_super(struct super_block *);
 static void udf_write_super(struct super_block *);
 static int udf_remount_fs(struct super_block *, int *, char *);
-static int udf_check_valid(struct super_block *, int, int);
-static int udf_vrs(struct super_block *sb, int silent);
 static void udf_load_logicalvolint(struct super_block *, struct kernel_extent_ad);
 static int udf_find_fileset(struct super_block *, struct kernel_lb_addr *,
 			    struct kernel_lb_addr *);
@@ -610,7 +608,7 @@ static int udf_remount_fs(struct super_block *sb, int *flags, char *options)
 	return 0;
 }
 
-static int udf_vrs(struct super_block *sb, int silent)
+static loff_t udf_vrs(struct super_block *sb, int silent)
 {
 	struct volStructDesc *vsd = NULL;
 	loff_t sector = 32768;
@@ -1706,7 +1704,7 @@ static noinline int udf_process_sequence(struct super_block *sb, long block,
  */
 static int udf_check_valid(struct super_block *sb, int novrs, int silent)
 {
-	long block;
+	loff_t block;
 	struct udf_sb_info *sbi = UDF_SB(sb);
 
 	if (novrs) {
@@ -1721,7 +1719,7 @@ static int udf_check_valid(struct super_block *sb, int novrs, int silent)
 			  "disc. Skipping validity check\n");
 	if (block && !sbi->s_last_block)
 		sbi->s_last_block = udf_get_last_block(sb);
-	return !block;
+	return !!block;
 }
 
 static int udf_check_volume(struct super_block *sb,
@@ -1735,7 +1733,7 @@ static int udf_check_volume(struct super_block *sb,
 		return 0;
 	}
 	sbi->s_last_block = uopt->lastblock;
-	if (udf_check_valid(sb, uopt->novrs, silent)) {
+	if (!udf_check_valid(sb, uopt->novrs, silent)) {
 		if (!silent)
 			printk(KERN_WARNING "UDF-fs: No VRS found\n");
 		return 0;
-- 
1.6.0.2


                 reply	other threads:[~2009-03-11 16:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1236787663-1067-1-git-send-email-jack@suse.cz \
    --to=jack@suse.cz \
    --cc=linux-fsdevel@vger.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).