diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-15 13:46:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-15 13:47:35 -0400 |
commit | f4921aff5b174349bc36551f142a5dbac782ea3f (patch) | |
tree | bdff8ca1531977ad1d04ac8d70e10f8dfbb26c38 /fs/nfs/direct.c | |
parent | 419217cb1d0266f62cbea6cdc6b1d1324350bc34 (diff) | |
parent | 05c88babab957dfd63bd351b25042d80bd854dd0 (diff) |
Merge git://git.linux-nfs.org/pub/linux/nfs-2.6
* git://git.linux-nfs.org/pub/linux/nfs-2.6: (131 commits)
NFSv4: Fix a typo in nfs_inode_reclaim_delegation
NFS: Add a boot parameter to disable 64 bit inode numbers
NFS: nfs_refresh_inode should clear cache_validity flags on success
NFS: Fix a connectathon regression in NFSv3 and NFSv4
NFS: Use nfs_refresh_inode() in ops that aren't expected to change the inode
SUNRPC: Don't call xprt_release in call refresh
SUNRPC: Don't call xprt_release() if call_allocate fails
SUNRPC: Fix buggy UDP transmission
[23/37] Clean up duplicate includes in
[2.6 patch] net/sunrpc/rpcb_clnt.c: make struct rpcb_program static
SUNRPC: Use correct type in buffer length calculations
SUNRPC: Fix default hostname created in rpc_create()
nfs: add server port to rpc_pipe info file
NFS: Get rid of some obsolete macros
NFS: Simplify filehandle revalidation
NFS: Ensure that nfs_link() returns a hashed dentry
NFS: Be strict about dentry revalidation when doing exclusive create
NFS: Don't zap the readdir caches upon error
NFS: Remove the redundant nfs_reval_fsid()
NFSv3: Always use directory post-op attributes in nfs3_proc_lookup
...
Fix up trivial conflict due to sock_owned_by_user() cleanup manually in
net/sunrpc/xprtsock.c
Diffstat (limited to 'fs/nfs/direct.c')
-rw-r--r-- | fs/nfs/direct.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index fcf4d384610e..32fe97211eea 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c | |||
@@ -368,7 +368,7 @@ static ssize_t nfs_direct_read(struct kiocb *iocb, unsigned long user_addr, size | |||
368 | return -ENOMEM; | 368 | return -ENOMEM; |
369 | 369 | ||
370 | dreq->inode = inode; | 370 | dreq->inode = inode; |
371 | dreq->ctx = get_nfs_open_context((struct nfs_open_context *)iocb->ki_filp->private_data); | 371 | dreq->ctx = get_nfs_open_context(nfs_file_open_context(iocb->ki_filp)); |
372 | if (!is_sync_kiocb(iocb)) | 372 | if (!is_sync_kiocb(iocb)) |
373 | dreq->iocb = iocb; | 373 | dreq->iocb = iocb; |
374 | 374 | ||
@@ -510,7 +510,6 @@ static void nfs_direct_write_complete(struct nfs_direct_req *dreq, struct inode | |||
510 | nfs_direct_write_reschedule(dreq); | 510 | nfs_direct_write_reschedule(dreq); |
511 | break; | 511 | break; |
512 | default: | 512 | default: |
513 | nfs_end_data_update(inode); | ||
514 | if (dreq->commit_data != NULL) | 513 | if (dreq->commit_data != NULL) |
515 | nfs_commit_free(dreq->commit_data); | 514 | nfs_commit_free(dreq->commit_data); |
516 | nfs_direct_free_writedata(dreq); | 515 | nfs_direct_free_writedata(dreq); |
@@ -533,7 +532,6 @@ static inline void nfs_alloc_commit_data(struct nfs_direct_req *dreq) | |||
533 | 532 | ||
534 | static void nfs_direct_write_complete(struct nfs_direct_req *dreq, struct inode *inode) | 533 | static void nfs_direct_write_complete(struct nfs_direct_req *dreq, struct inode *inode) |
535 | { | 534 | { |
536 | nfs_end_data_update(inode); | ||
537 | nfs_direct_free_writedata(dreq); | 535 | nfs_direct_free_writedata(dreq); |
538 | nfs_zap_mapping(inode, inode->i_mapping); | 536 | nfs_zap_mapping(inode, inode->i_mapping); |
539 | nfs_direct_complete(dreq); | 537 | nfs_direct_complete(dreq); |
@@ -718,14 +716,12 @@ static ssize_t nfs_direct_write(struct kiocb *iocb, unsigned long user_addr, siz | |||
718 | sync = FLUSH_STABLE; | 716 | sync = FLUSH_STABLE; |
719 | 717 | ||
720 | dreq->inode = inode; | 718 | dreq->inode = inode; |
721 | dreq->ctx = get_nfs_open_context((struct nfs_open_context *)iocb->ki_filp->private_data); | 719 | dreq->ctx = get_nfs_open_context(nfs_file_open_context(iocb->ki_filp)); |
722 | if (!is_sync_kiocb(iocb)) | 720 | if (!is_sync_kiocb(iocb)) |
723 | dreq->iocb = iocb; | 721 | dreq->iocb = iocb; |
724 | 722 | ||
725 | nfs_add_stats(inode, NFSIOS_DIRECTWRITTENBYTES, count); | 723 | nfs_add_stats(inode, NFSIOS_DIRECTWRITTENBYTES, count); |
726 | 724 | ||
727 | nfs_begin_data_update(inode); | ||
728 | |||
729 | rpc_clnt_sigmask(clnt, &oldset); | 725 | rpc_clnt_sigmask(clnt, &oldset); |
730 | result = nfs_direct_write_schedule(dreq, user_addr, count, pos, sync); | 726 | result = nfs_direct_write_schedule(dreq, user_addr, count, pos, sync); |
731 | if (!result) | 727 | if (!result) |