diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-08-19 17:27:12 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-08-19 17:27:12 -0400 |
commit | d14b50cc60ca465290fcdb3b88e7d5fb684361ed (patch) | |
tree | c4a712123b94cd4c0ab4d8d9d87a7619e9bcb6ba /fs/fuse/file.c | |
parent | a34b6fc04d58ad72fe0cc74cd448f4551bd2ebaf (diff) | |
parent | ef7d1b244fa6c94fb76d5f787b8629df64ea4046 (diff) |
Merge branch 'master' into upstream-fixes
Diffstat (limited to 'fs/fuse/file.c')
-rw-r--r-- | fs/fuse/file.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 63614ed1633..5c4fcd1dbf5 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -395,14 +395,16 @@ static int fuse_readpages(struct file *file, struct address_space *mapping, struct fuse_readpages_data data; int err; + err = -EIO; if (is_bad_inode(inode)) - return -EIO; + goto clean_pages_up; data.file = file; data.inode = inode; data.req = fuse_get_req(fc); + err = PTR_ERR(data.req); if (IS_ERR(data.req)) - return PTR_ERR(data.req); + goto clean_pages_up; err = read_cache_pages(mapping, pages, fuse_readpages_fill, &data); if (!err) { @@ -412,6 +414,10 @@ static int fuse_readpages(struct file *file, struct address_space *mapping, fuse_put_request(fc, data.req); } return err; + +clean_pages_up: + put_pages_list(pages); + return err; } static size_t fuse_send_write(struct fuse_req *req, struct file *file, |