git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.3
[linux-2.6.git]
/
fs
/
ncpfs
/
file.c
diff --git
a/fs/ncpfs/file.c
b/fs/ncpfs/file.c
index
c1745b6
..
4947d9b
100644
(file)
--- a/
fs/ncpfs/file.c
+++ b/
fs/ncpfs/file.c
@@
-115,11
+115,6
@@
ncp_file_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
if (!ncp_conn_valid(NCP_SERVER(inode)))
return -EIO;
if (!ncp_conn_valid(NCP_SERVER(inode)))
return -EIO;
- if (!S_ISREG(inode->i_mode)) {
- DPRINTK("ncp_file_read: read from non-file, mode %07o\n",
- inode->i_mode);
- return -EINVAL;
- }
pos = *ppos;
pos = *ppos;
@@
-175,10
+170,8
@@
ncp_file_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
*ppos = pos;
*ppos = pos;
- if (!IS_RDONLY(inode)) {
- inode->i_atime = CURRENT_TIME;
- }
-
+ file_accessed(file);
+
DPRINTK("ncp_file_read: exit %s/%s\n",
dentry->d_parent->d_name.name, dentry->d_name.name);
outrel:
DPRINTK("ncp_file_read: exit %s/%s\n",
dentry->d_parent->d_name.name, dentry->d_name.name);
outrel:
@@
-201,11
+194,6
@@
ncp_file_write(struct file *file, const char __user *buf, size_t count, loff_t *
dentry->d_parent->d_name.name, dentry->d_name.name);
if (!ncp_conn_valid(NCP_SERVER(inode)))
return -EIO;
dentry->d_parent->d_name.name, dentry->d_name.name);
if (!ncp_conn_valid(NCP_SERVER(inode)))
return -EIO;
- if (!S_ISREG(inode->i_mode)) {
- DPRINTK("ncp_file_write: write to non-file, mode %07o\n",
- inode->i_mode);
- return -EINVAL;
- }
if ((ssize_t) count < 0)
return -EINVAL;
pos = *ppos;
if ((ssize_t) count < 0)
return -EINVAL;
pos = *ppos;
@@
-273,8
+261,9
@@
ncp_file_write(struct file *file, const char __user *buf, size_t count, loff_t *
}
}
vfree(bouncebuffer);
}
}
vfree(bouncebuffer);
- inode->i_mtime = inode->i_atime = CURRENT_TIME;
-
+
+ inode_update_time(inode, 1);
+
*ppos = pos;
if (pos > inode->i_size) {
*ppos = pos;
if (pos > inode->i_size) {