2005-03-31 21:13:27

by Miklos Szeredi

[permalink] [raw]
Subject: [PATCH] FUSE: fix warning on x86_64

This patch fixes a couple of warnings when compiling on the x86_64
architecture.

Signed-off-by: Miklos Szeredi <[email protected]>

diff -rup linux-2.6.12-rc1-mm4/fs/fuse/file.c linux-fuse/fs/fuse/file.c
--- linux-2.6.12-rc1-mm4/fs/fuse/file.c 2005-03-31 21:52:18.000000000 +0200
+++ linux-fuse/fs/fuse/file.c 2005-03-31 21:52:00.000000000 +0200
@@ -420,7 +420,7 @@ static ssize_t fuse_direct_io(struct fil
{
struct inode *inode = file->f_dentry->d_inode;
struct fuse_conn *fc = get_fuse_conn(inode);
- unsigned nmax = write ? fc->max_write : fc->max_read;
+ size_t nmax = write ? fc->max_write : fc->max_read;
loff_t pos = *ppos;
ssize_t res = 0;
struct fuse_req *req = fuse_get_request(fc);
@@ -428,8 +428,8 @@ static ssize_t fuse_direct_io(struct fil
return -ERESTARTSYS;

while (count) {
- unsigned tmp;
- unsigned nres;
+ size_t tmp;
+ size_t nres;
size_t nbytes = min(count, nmax);
int err = fuse_get_user_pages(req, buf, nbytes, !write);
if (err) {