Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15351
b: refs/heads/master
c: 30f04a4
h: refs/heads/master
i:
  15349: 33625e6
  15347: 06099e4
  15343: a9d4135
v: v3
  • Loading branch information
Paolo 'Blaisorblade' Giarrusso authored and Linus Torvalds committed Dec 29, 2005
1 parent 42f866f commit c778b34
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 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: 3d0a07e3310c947c048bd01d8d0efa0e4fae5ba9
refs/heads/master: 30f04a4efa73dc80bf3f59f3f19ad5a24ac5ac0a
7 changes: 6 additions & 1 deletion trunk/fs/hostfs/hostfs_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,11 +501,16 @@ int hostfs_commit_write(struct file *file, struct page *page, unsigned from,
long long start;
int err = 0;

start = (long long) (page->index << PAGE_CACHE_SHIFT) + from;
start = (((long long) page->index) << PAGE_CACHE_SHIFT) + from;
buffer = kmap(page);
err = write_file(FILE_HOSTFS_I(file)->fd, &start, buffer + from,
to - from);
if(err > 0) err = 0;

/* Actually, if !err, write_file has added to-from to start, so, despite
* the appearance, we are comparing i_size against the _last_ written
* location, as we should. */

if(!err && (start > inode->i_size))
inode->i_size = start;

Expand Down

0 comments on commit c778b34

Please sign in to comment.