Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218949
b: refs/heads/master
c: b04faaf
h: refs/heads/master
i:
  218947: 4f4ea4f
v: v3
  • Loading branch information
Venkateswararao Jujjuri (JV) authored and Eric Van Hensbergen committed Oct 28, 2010
1 parent bc32c7a commit 53aebd7
Show file tree
Hide file tree
Showing 2 changed files with 16 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: 76381a42e4a5606774fd48413e6282cd7130ff2c
refs/heads/master: b04faaf3717307cd976a15667c8c24161c1d24ef
15 changes: 15 additions & 0 deletions trunk/fs/9p/vfs_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#include "cache.h"

static const struct file_operations v9fs_cached_file_operations;
static const struct file_operations v9fs_cached_file_operations_dotl;

/**
* v9fs_file_open - open a file (or directory)
Expand Down Expand Up @@ -92,6 +93,8 @@ int v9fs_file_open(struct inode *inode, struct file *file)
/* enable cached file options */
if(file->f_op == &v9fs_file_operations)
file->f_op = &v9fs_cached_file_operations;
else if (file->f_op == &v9fs_file_operations_dotl)
file->f_op = &v9fs_cached_file_operations_dotl;

#ifdef CONFIG_9P_FSCACHE
v9fs_cache_inode_set_cookie(inode, file);
Expand Down Expand Up @@ -299,6 +302,18 @@ static const struct file_operations v9fs_cached_file_operations = {
.fsync = v9fs_file_fsync,
};

static const struct file_operations v9fs_cached_file_operations_dotl = {
.llseek = generic_file_llseek,
.read = do_sync_read,
.aio_read = generic_file_aio_read,
.write = v9fs_file_write,
.open = v9fs_file_open,
.release = v9fs_dir_release,
.lock = v9fs_file_lock,
.mmap = generic_file_readonly_mmap,
.fsync = v9fs_file_fsync,
};

const struct file_operations v9fs_file_operations = {
.llseek = generic_file_llseek,
.read = v9fs_file_read,
Expand Down

0 comments on commit 53aebd7

Please sign in to comment.