Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232142
b: refs/heads/master
c: 7a6a19b
h: refs/heads/master
v: v3
  • Loading branch information
Pavel Shilovsky authored and Steve French committed Jan 20, 2011
1 parent f9acb0c commit 630704c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 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: 8be7e6ba142423e6ad98fed293c96f196f685229
refs/heads/master: 7a6a19b17ab9103ec708c18befd28f2a3908d4c1
4 changes: 2 additions & 2 deletions trunk/fs/cifs/cifsfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ const struct file_operations cifs_file_strict_ops = {
.lock = cifs_lock,
.fsync = cifs_strict_fsync,
.flush = cifs_flush,
.mmap = cifs_file_mmap,
.mmap = cifs_file_strict_mmap,
.splice_read = generic_file_splice_read,
.llseek = cifs_llseek,
#ifdef CONFIG_CIFS_POSIX
Expand Down Expand Up @@ -798,7 +798,7 @@ const struct file_operations cifs_file_strict_nobrl_ops = {
.release = cifs_close,
.fsync = cifs_strict_fsync,
.flush = cifs_flush,
.mmap = cifs_file_mmap,
.mmap = cifs_file_strict_mmap,
.splice_read = generic_file_splice_read,
.llseek = cifs_llseek,
#ifdef CONFIG_CIFS_POSIX
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/cifs/cifsfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ extern int cifs_fsync(struct file *, int);
extern int cifs_strict_fsync(struct file *, int);
extern int cifs_flush(struct file *, fl_owner_t id);
extern int cifs_file_mmap(struct file * , struct vm_area_struct *);
extern int cifs_file_strict_mmap(struct file * , struct vm_area_struct *);
extern const struct file_operations cifs_dir_ops;
extern int cifs_dir_open(struct inode *inode, struct file *file);
extern int cifs_readdir(struct file *file, void *direntry, filldir_t filldir);
Expand Down
15 changes: 15 additions & 0 deletions trunk/fs/cifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1769,6 +1769,21 @@ static ssize_t cifs_read(struct file *file, char *read_data, size_t read_size,
return total_read;
}

int cifs_file_strict_mmap(struct file *file, struct vm_area_struct *vma)
{
int rc, xid;
struct inode *inode = file->f_path.dentry->d_inode;

xid = GetXid();

if (!CIFS_I(inode)->clientCanCacheRead)
cifs_invalidate_mapping(inode);

rc = generic_file_mmap(file, vma);
FreeXid(xid);
return rc;
}

int cifs_file_mmap(struct file *file, struct vm_area_struct *vma)
{
int rc, xid;
Expand Down

0 comments on commit 630704c

Please sign in to comment.