summaryrefslogtreecommitdiff
path: root/fs/reiserfs
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2009-03-30 18:02:30 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-30 19:16:37 (GMT)
commitec6ea56b2f1d3811815e53131e85fd1fc9b51873 (patch)
treecf5897a3bef7fdfaf96edcce21ffc6738aaea941 /fs/reiserfs
parentf437c529e3cd4853c1edff6fe3b191ad32304e8f (diff)
downloadlinux-ec6ea56b2f1d3811815e53131e85fd1fc9b51873.tar.xz
reiserfs: xattr reiserfs_get_page takes offset instead of index
This patch changes reiserfs_get_page to take an offset rather than an index since no callers calculate the index differently. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/reiserfs')
-rw-r--r--fs/reiserfs/xattr.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c
index 59b0850..132d901 100644
--- a/fs/reiserfs/xattr.c
+++ b/fs/reiserfs/xattr.c
@@ -376,14 +376,14 @@ static inline void reiserfs_put_page(struct page *page)
page_cache_release(page);
}
-static struct page *reiserfs_get_page(struct inode *dir, unsigned long n)
+static struct page *reiserfs_get_page(struct inode *dir, size_t n)
{
struct address_space *mapping = dir->i_mapping;
struct page *page;
/* We can deadlock if we try to free dentries,
and an unlink/rmdir has just occured - GFP_NOFS avoids this */
mapping_set_gfp_mask(mapping, GFP_NOFS);
- page = read_mapping_page(mapping, n, NULL);
+ page = read_mapping_page(mapping, n >> PAGE_CACHE_SHIFT, NULL);
if (!IS_ERR(page)) {
kmap(page);
if (PageError(page))
@@ -470,8 +470,7 @@ reiserfs_xattr_set(struct inode *inode, const char *name, const void *buffer,
else
chunk = buffer_size - buffer_pos;
- page = reiserfs_get_page(dentry->d_inode,
- file_pos >> PAGE_CACHE_SHIFT);
+ page = reiserfs_get_page(dentry->d_inode, file_pos);
if (IS_ERR(page)) {
err = PTR_ERR(page);
goto out_filp;
@@ -577,8 +576,7 @@ reiserfs_xattr_get(const struct inode *inode, const char *name, void *buffer,
else
chunk = isize - file_pos;
- page = reiserfs_get_page(dentry->d_inode,
- file_pos >> PAGE_CACHE_SHIFT);
+ page = reiserfs_get_page(dentry->d_inode, file_pos);
if (IS_ERR(page)) {
err = PTR_ERR(page);
goto out_dput;