Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252893
b: refs/heads/master
c: 707ed5f
h: refs/heads/master
i:
  252891: b86c082
v: v3
  • Loading branch information
Benny Halevy authored and Boaz Harrosh committed May 29, 2011
1 parent 1a73990 commit 91e2a39
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fb3296eb4636763918edef2d22e45b85b15d4518
refs/heads/master: 707ed5fdb587c71fdb7ad224ba1d80231f33c974
8 changes: 8 additions & 0 deletions trunk/fs/nfs/pnfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,7 @@ pnfs_update_layout(struct inode *ino,
.offset = pos,
.length = count,
};
unsigned pg_offset;
struct nfs_inode *nfsi = NFS_I(ino);
struct nfs_client *clp = NFS_SERVER(ino)->nfs_client;
struct pnfs_layout_hdr *lo;
Expand Down Expand Up @@ -899,6 +900,13 @@ pnfs_update_layout(struct inode *ino,
spin_unlock(&clp->cl_lock);
}

pg_offset = arg.offset & ~PAGE_CACHE_MASK;
if (pg_offset) {
arg.offset -= pg_offset;
arg.length += pg_offset;
}
arg.length = PAGE_CACHE_ALIGN(arg.length);

lseg = send_layoutget(lo, ctx, &arg, gfp_flags);
if (!lseg && first) {
spin_lock(&clp->cl_lock);
Expand Down

0 comments on commit 91e2a39

Please sign in to comment.