Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 16963
b: refs/heads/master
c: 54b21a7
h: refs/heads/master
i:
  16961: 7236c16
  16959: 66773f3
v: v3
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Jan 9, 2006
1 parent 0aec37f commit 2cb6b30
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 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: 676121fcb66c861804e38d94214fd5670a1ef595
refs/heads/master: 54b21a7992a31d30c9a91f7e0a00ffdb4bd0caee
2 changes: 1 addition & 1 deletion trunk/fs/afs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ static inline void afs_dir_check_page(struct inode *dir, struct page *page)
#endif

/* determine how many magic numbers there should be in this page */
latter = dir->i_size - (page->index << PAGE_CACHE_SHIFT);
latter = dir->i_size - page_offset(page);
if (latter >= PAGE_SIZE)
qty = PAGE_SIZE;
else
Expand Down
6 changes: 3 additions & 3 deletions trunk/fs/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1762,7 +1762,7 @@ static int __block_write_full_page(struct inode *inode, struct page *page,
* handle that here by just cleaning them.
*/

block = page->index << (PAGE_CACHE_SHIFT - inode->i_blkbits);
block = (sector_t)page->index << (PAGE_CACHE_SHIFT - inode->i_blkbits);
head = page_buffers(page);
bh = head;

Expand Down Expand Up @@ -2635,7 +2635,7 @@ int block_truncate_page(struct address_space *mapping,
pgoff_t index = from >> PAGE_CACHE_SHIFT;
unsigned offset = from & (PAGE_CACHE_SIZE-1);
unsigned blocksize;
pgoff_t iblock;
sector_t iblock;
unsigned length, pos;
struct inode *inode = mapping->host;
struct page *page;
Expand All @@ -2651,7 +2651,7 @@ int block_truncate_page(struct address_space *mapping,
return 0;

length = blocksize - length;
iblock = index << (PAGE_CACHE_SHIFT - inode->i_blkbits);
iblock = (sector_t)index << (PAGE_CACHE_SHIFT - inode->i_blkbits);

page = grab_cache_page(mapping, index);
err = -ENOMEM;
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/freevxfs/vxfs_immed.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ static int
vxfs_immed_readpage(struct file *fp, struct page *pp)
{
struct vxfs_inode_info *vip = VXFS_INO(pp->mapping->host);
u_int64_t offset = pp->index << PAGE_CACHE_SHIFT;
caddr_t kaddr;
u_int64_t offset = (u_int64_t)pp->index << PAGE_CACHE_SHIFT;
caddr_t kaddr;

kaddr = kmap(pp);
memcpy(kaddr, vip->vii_immed.vi_immed + offset, PAGE_CACHE_SIZE);
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/jffs/inode-v23.c
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ jffs_do_readpage_nolock(struct file *file, struct page *page)

read_len = 0;
result = 0;
offset = page->index << PAGE_CACHE_SHIFT;
offset = page_offset(page);

kmap(page);
buf = page_address(page);
Expand Down Expand Up @@ -1545,7 +1545,7 @@ jffs_commit_write(struct file *filp, struct page *page,
{
void *addr = page_address(page) + from;
/* XXX: PAGE_CACHE_SHIFT or PAGE_SHIFT */
loff_t pos = (page->index<<PAGE_CACHE_SHIFT) + from;
loff_t pos = page_offset(page) + from;

return jffs_file_write(filp, addr, to-from, &pos);
} /* jffs_commit_write() */
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/mpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ do_mpage_readpage(struct bio *bio, struct page *page, unsigned nr_pages,
if (page_has_buffers(page))
goto confused;

block_in_file = page->index << (PAGE_CACHE_SHIFT - blkbits);
block_in_file = (sector_t)page->index << (PAGE_CACHE_SHIFT - blkbits);
last_block = (i_size_read(inode) + blocksize - 1) >> blkbits;

bh.b_page = page;
Expand Down Expand Up @@ -466,7 +466,7 @@ __mpage_writepage(struct bio *bio, struct page *page, get_block_t get_block,
* The page has no buffers: map it to disk
*/
BUG_ON(!PageUptodate(page));
block_in_file = page->index << (PAGE_CACHE_SHIFT - blkbits);
block_in_file = (sector_t)page->index << (PAGE_CACHE_SHIFT - blkbits);
last_block = (i_size - 1) >> blkbits;
map_bh.b_page = page;
for (page_block = 0; page_block < blocks_per_page; ) {
Expand Down
6 changes: 3 additions & 3 deletions trunk/fs/romfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ static int
romfs_readpage(struct file *file, struct page * page)
{
struct inode *inode = page->mapping->host;
unsigned long offset, avail, readlen;
loff_t offset, avail, readlen;
void *buf;
int result = -EIO;

Expand All @@ -429,8 +429,8 @@ romfs_readpage(struct file *file, struct page * page)
goto err_out;

/* 32 bit warning -- but not for us :) */
offset = page->index << PAGE_CACHE_SHIFT;
if (offset < inode->i_size) {
offset = page_offset(page);
if (offset < i_size_read(inode)) {
avail = inode->i_size-offset;
readlen = min_t(unsigned long, avail, PAGE_SIZE);
if (romfs_copyfrom(inode, buf, ROMFS_I(inode)->i_dataoffset+offset, readlen) == readlen) {
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/smbfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ smb_updatepage(struct file *file, struct page *page, unsigned long offset,
{
struct dentry *dentry = file->f_dentry;

DEBUG1("(%s/%s %d@%ld)\n", DENTRY_PATH(dentry),
count, (page->index << PAGE_CACHE_SHIFT)+offset);
DEBUG1("(%s/%s %d@%lld)\n", DENTRY_PATH(dentry), count,
((unsigned long long)page->index << PAGE_CACHE_SHIFT) + offset);

return smb_writepage_sync(dentry->d_inode, page, offset, count);
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/sysv/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ static int sysv_readdir(struct file * filp, void * dirent, filldir_t filldir)
offset = (char *)de - kaddr;

over = filldir(dirent, name, strnlen(name,SYSV_NAMELEN),
(n<<PAGE_CACHE_SHIFT) | offset,
((loff_t)n<<PAGE_CACHE_SHIFT) | offset,
fs16_to_cpu(SYSV_SB(sb), de->inode),
DT_UNKNOWN);
if (over) {
Expand All @@ -115,7 +115,7 @@ static int sysv_readdir(struct file * filp, void * dirent, filldir_t filldir)
}

done:
filp->f_pos = (n << PAGE_CACHE_SHIFT) | offset;
filp->f_pos = ((loff_t)n << PAGE_CACHE_SHIFT) | offset;
unlock_kernel();
return 0;
}
Expand Down

0 comments on commit 2cb6b30

Please sign in to comment.