Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 138851
b: refs/heads/master
c: ec6ea56
h: refs/heads/master
i:
  138849: bdda241
  138847: d5a88e3
v: v3
  • Loading branch information
Jeff Mahoney authored and Linus Torvalds committed Mar 30, 2009
1 parent ee6d950 commit c842ef9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f437c529e3cd4853c1edff6fe3b191ad32304e8f
refs/heads/master: ec6ea56b2f1d3811815e53131e85fd1fc9b51873
10 changes: 4 additions & 6 deletions trunk/fs/reiserfs/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit c842ef9

Please sign in to comment.