diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2008-06-17 12:05:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-06-17 21:08:10 -0400 |
commit | f948d56435fc1f7506f08866302ecd6e60b533dd (patch) | |
tree | eb729171e36e53888ed9dd7033e3dee1b2a682e0 /fs/fuse/inode.c | |
parent | cd50e89244087432a70598e432ff199a009b0e73 (diff) |
fuse: fix thinko in max I/O size calucation
Use max not min to enforce a lower limit on the max I/O size.
This bug was introduced by "fuse: fix max i/o size calculation" (commit
e5d9a0df07484d6d191756878c974e4307fb24ce).
Thanks to Brian Wang for noticing.
Reported-by: Brian Wang <ywang221@hotmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Acked-by: Szabolcs Szakacsits <szaka@ntfs-3g.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fuse/inode.c')
-rw-r--r-- | fs/fuse/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 43e99513334a..3141690558c8 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -591,7 +591,7 @@ static void process_init_reply(struct fuse_conn *fc, struct fuse_req *req) | |||
591 | fc->bdi.ra_pages = min(fc->bdi.ra_pages, ra_pages); | 591 | fc->bdi.ra_pages = min(fc->bdi.ra_pages, ra_pages); |
592 | fc->minor = arg->minor; | 592 | fc->minor = arg->minor; |
593 | fc->max_write = arg->minor < 5 ? 4096 : arg->max_write; | 593 | fc->max_write = arg->minor < 5 ? 4096 : arg->max_write; |
594 | fc->max_write = min_t(unsigned, 4096, fc->max_write); | 594 | fc->max_write = max_t(unsigned, 4096, fc->max_write); |
595 | fc->conn_init = 1; | 595 | fc->conn_init = 1; |
596 | } | 596 | } |
597 | fuse_put_request(fc, req); | 597 | fuse_put_request(fc, req); |
@@ -667,7 +667,7 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent) | |||
667 | fc->flags = d.flags; | 667 | fc->flags = d.flags; |
668 | fc->user_id = d.user_id; | 668 | fc->user_id = d.user_id; |
669 | fc->group_id = d.group_id; | 669 | fc->group_id = d.group_id; |
670 | fc->max_read = min_t(unsigned, 4096, d.max_read); | 670 | fc->max_read = max_t(unsigned, 4096, d.max_read); |
671 | 671 | ||
672 | /* Used by get_root_inode() */ | 672 | /* Used by get_root_inode() */ |
673 | sb->s_fs_info = fc; | 673 | sb->s_fs_info = fc; |