Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164686
b: refs/heads/master
c: 8a9f47d
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Linus Torvalds committed Sep 23, 2009
1 parent 0ad09e6 commit 554eb94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 42 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: 562787a5c32ccdf182de27793a83a9f2ee86cd77
refs/heads/master: 8a9f47ddb1d5cc3cda2d1f26f8da74e059fa7b87
42 changes: 1 addition & 41 deletions trunk/fs/ntfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -2145,46 +2145,6 @@ static ssize_t ntfs_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
return ret;
}

/**
* ntfs_file_writev -
*
* Basically the same as generic_file_writev() except that it ends up calling
* ntfs_file_aio_write_nolock() instead of __generic_file_aio_write_nolock().
*/
static ssize_t ntfs_file_writev(struct file *file, const struct iovec *iov,
unsigned long nr_segs, loff_t *ppos)
{
struct address_space *mapping = file->f_mapping;
struct inode *inode = mapping->host;
struct kiocb kiocb;
ssize_t ret;

mutex_lock(&inode->i_mutex);
init_sync_kiocb(&kiocb, file);
ret = ntfs_file_aio_write_nolock(&kiocb, iov, nr_segs, ppos);
if (ret == -EIOCBQUEUED)
ret = wait_on_sync_kiocb(&kiocb);
mutex_unlock(&inode->i_mutex);
if (ret > 0) {
int err = generic_write_sync(file, *ppos - ret, ret);
if (err < 0)
ret = err;
}
return ret;
}

/**
* ntfs_file_write - simple wrapper for ntfs_file_writev()
*/
static ssize_t ntfs_file_write(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
{
struct iovec local_iov = { .iov_base = (void __user *)buf,
.iov_len = count };

return ntfs_file_writev(file, &local_iov, 1, ppos);
}

/**
* ntfs_file_fsync - sync a file to disk
* @filp: file to be synced
Expand Down Expand Up @@ -2247,7 +2207,7 @@ const struct file_operations ntfs_file_ops = {
.read = do_sync_read, /* Read from file. */
.aio_read = generic_file_aio_read, /* Async read from file. */
#ifdef NTFS_RW
.write = ntfs_file_write, /* Write to file. */
.write = do_sync_write, /* Write to file. */
.aio_write = ntfs_file_aio_write, /* Async write to file. */
/*.release = ,*/ /* Last file is closed. See
fs/ext2/file.c::
Expand Down

0 comments on commit 554eb94

Please sign in to comment.