mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [2.6.26 patch] fuse: fix thinko in max I/O size calucation
@ 2008-06-17 16:05 Miklos Szeredi
  2008-06-17 16:59 ` Szabolcs Szakacsits
  0 siblings, 1 reply; 3+ messages in thread
From: Miklos Szeredi @ 2008-06-17 16:05 UTC (permalink / raw)
  To: torvalds; +Cc: akpm, linux-kernel, linux-fsdevel, ywang221, szaka

From: Miklos Szeredi <mszeredi@suse.cz>

Use max not min to enforce a lower limit on the max I/O size.

This bug was introduced by

   commit e5d9a0df07484d6d191756878c974e4307fb24ce
   Author: Miklos Szeredi <mszeredi@suse.cz>
   Date:   Wed Apr 30 00:54:44 2008 -0700
   
       fuse: fix max i/o size calculation

Thanks to Brian Wang for noticing.

Reported-by: Brian Wang <ywang221@hotmail.com>
CC: Szabolcs Szakacsits <szaka@ntfs-3g.org>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
---
 fs/fuse/inode.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6/fs/fuse/inode.c
===================================================================
--- linux-2.6.orig/fs/fuse/inode.c	2008-06-17 17:55:38.000000000 +0200
+++ linux-2.6/fs/fuse/inode.c	2008-06-17 17:55:48.000000000 +0200
@@ -591,7 +591,7 @@ static void process_init_reply(struct fu
 		fc->bdi.ra_pages = min(fc->bdi.ra_pages, ra_pages);
 		fc->minor = arg->minor;
 		fc->max_write = arg->minor < 5 ? 4096 : arg->max_write;
-		fc->max_write = min_t(unsigned, 4096, fc->max_write);
+		fc->max_write = max_t(unsigned, 4096, fc->max_write);
 		fc->conn_init = 1;
 	}
 	fuse_put_request(fc, req);
@@ -667,7 +667,7 @@ static int fuse_fill_super(struct super_
 	fc->flags = d.flags;
 	fc->user_id = d.user_id;
 	fc->group_id = d.group_id;
-	fc->max_read = min_t(unsigned, 4096, d.max_read);
+	fc->max_read = max_t(unsigned, 4096, d.max_read);
 
 	/* Used by get_root_inode() */
 	sb->s_fs_info = fc;

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-06-17 17:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-17 16:05 [2.6.26 patch] fuse: fix thinko in max I/O size calucation Miklos Szeredi
2008-06-17 16:59 ` Szabolcs Szakacsits
2008-06-17 17:02   ` Miklos Szeredi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®