aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/file.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2008-04-24 14:01:02 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-04-24 14:01:02 -0400
commit233607dbbc823caf685e778cabc49fb7f679900b (patch)
tree13840137ee10788061cbec60fcfe8ea4c274558e /fs/nfs/file.c
parent3dc5063786b273f1aee545844f6bd4e9651ebffe (diff)
parentb48633bd086d21f4a2a5bea96c7e6c7ba58eb60c (diff)
Merge branch 'devel'
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r--fs/nfs/file.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 5d2e9d9a4e28..3536b01164f9 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -238,10 +238,8 @@ nfs_file_read(struct kiocb *iocb, const struct iovec *iov,
238 ssize_t result; 238 ssize_t result;
239 size_t count = iov_length(iov, nr_segs); 239 size_t count = iov_length(iov, nr_segs);
240 240
241#ifdef CONFIG_NFS_DIRECTIO
242 if (iocb->ki_filp->f_flags & O_DIRECT) 241 if (iocb->ki_filp->f_flags & O_DIRECT)
243 return nfs_file_direct_read(iocb, iov, nr_segs, pos); 242 return nfs_file_direct_read(iocb, iov, nr_segs, pos);
244#endif
245 243
246 dfprintk(VFS, "nfs: read(%s/%s, %lu@%lu)\n", 244 dfprintk(VFS, "nfs: read(%s/%s, %lu@%lu)\n",
247 dentry->d_parent->d_name.name, dentry->d_name.name, 245 dentry->d_parent->d_name.name, dentry->d_name.name,
@@ -387,9 +385,7 @@ const struct address_space_operations nfs_file_aops = {
387 .write_end = nfs_write_end, 385 .write_end = nfs_write_end,
388 .invalidatepage = nfs_invalidate_page, 386 .invalidatepage = nfs_invalidate_page,
389 .releasepage = nfs_release_page, 387 .releasepage = nfs_release_page,
390#ifdef CONFIG_NFS_DIRECTIO
391 .direct_IO = nfs_direct_IO, 388 .direct_IO = nfs_direct_IO,
392#endif
393 .launder_page = nfs_launder_page, 389 .launder_page = nfs_launder_page,
394}; 390};
395 391
@@ -447,10 +443,8 @@ static ssize_t nfs_file_write(struct kiocb *iocb, const struct iovec *iov,
447 ssize_t result; 443 ssize_t result;
448 size_t count = iov_length(iov, nr_segs); 444 size_t count = iov_length(iov, nr_segs);
449 445
450#ifdef CONFIG_NFS_DIRECTIO
451 if (iocb->ki_filp->f_flags & O_DIRECT) 446 if (iocb->ki_filp->f_flags & O_DIRECT)
452 return nfs_file_direct_write(iocb, iov, nr_segs, pos); 447 return nfs_file_direct_write(iocb, iov, nr_segs, pos);
453#endif
454 448
455 dfprintk(VFS, "nfs: write(%s/%s(%ld), %lu@%Ld)\n", 449 dfprintk(VFS, "nfs: write(%s/%s(%ld), %lu@%Ld)\n",
456 dentry->d_parent->d_name.name, dentry->d_name.name, 450 dentry->d_parent->d_name.name, dentry->d_name.name,
@@ -576,17 +570,9 @@ static int do_setlk(struct file *filp, int cmd, struct file_lock *fl)
576 570
577 lock_kernel(); 571 lock_kernel();
578 /* Use local locking if mounted with "-onolock" */ 572 /* Use local locking if mounted with "-onolock" */
579 if (!(NFS_SERVER(inode)->flags & NFS_MOUNT_NONLM)) { 573 if (!(NFS_SERVER(inode)->flags & NFS_MOUNT_NONLM))
580 status = NFS_PROTO(inode)->lock(filp, cmd, fl); 574 status = NFS_PROTO(inode)->lock(filp, cmd, fl);
581 /* If we were signalled we still need to ensure that 575 else
582 * we clean up any state on the server. We therefore
583 * record the lock call as having succeeded in order to
584 * ensure that locks_remove_posix() cleans it out when
585 * the process exits.
586 */
587 if (status == -EINTR || status == -ERESTARTSYS)
588 do_vfs_lock(filp, fl);
589 } else
590 status = do_vfs_lock(filp, fl); 576 status = do_vfs_lock(filp, fl);
591 unlock_kernel(); 577 unlock_kernel();
592 if (status < 0) 578 if (status < 0)