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
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
fs
/
ncpfs
/
file.c
diff --git
a/fs/ncpfs/file.c
b/fs/ncpfs/file.c
index
4947d9b
..
b91fea0
100644
(file)
--- a/
fs/ncpfs/file.c
+++ b/
fs/ncpfs/file.c
@@
-46,7
+46,7
@@
int ncp_make_open(struct inode *inode, int right)
NCP_FINFO(inode)->volNumber,
NCP_FINFO(inode)->dirEntNum);
error = -EACCES;
NCP_FINFO(inode)->volNumber,
NCP_FINFO(inode)->dirEntNum);
error = -EACCES;
-
down(&NCP_FINFO(inode)->open_sem
);
+
mutex_lock(&NCP_FINFO(inode)->open_mutex
);
if (!atomic_read(&NCP_FINFO(inode)->opened)) {
struct ncp_entry_info finfo;
int result;
if (!atomic_read(&NCP_FINFO(inode)->opened)) {
struct ncp_entry_info finfo;
int result;
@@
-93,7
+93,7
@@
int ncp_make_open(struct inode *inode, int right)
}
out_unlock:
}
out_unlock:
-
up(&NCP_FINFO(inode)->open_sem
);
+
mutex_unlock(&NCP_FINFO(inode)->open_mutex
);
out:
return error;
}
out:
return error;
}
@@
-101,7
+101,7
@@
out:
static ssize_t
ncp_file_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
{
static ssize_t
ncp_file_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
{
- struct dentry *dentry = file->f_dentry;
+ struct dentry *dentry = file->f_
path.
dentry;
struct inode *inode = dentry->d_inode;
size_t already_read = 0;
off_t pos;
struct inode *inode = dentry->d_inode;
size_t already_read = 0;
off_t pos;
@@
-182,7
+182,7
@@
outrel:
static ssize_t
ncp_file_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
{
static ssize_t
ncp_file_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
{
- struct dentry *dentry = file->f_dentry;
+ struct dentry *dentry = file->f_
path.
dentry;
struct inode *inode = dentry->d_inode;
size_t already_written = 0;
off_t pos;
struct inode *inode = dentry->d_inode;
size_t already_written = 0;
off_t pos;
@@
-262,7
+262,7
@@
ncp_file_write(struct file *file, const char __user *buf, size_t count, loff_t *
}
vfree(bouncebuffer);
}
vfree(bouncebuffer);
-
inode_update_time(inode, 1
);
+
file_update_time(file
);
*ppos = pos;
*ppos = pos;
@@
-283,12
+283,15
@@
static int ncp_release(struct inode *inode, struct file *file) {
return 0;
}
return 0;
}
-struct file_operations ncp_file_operations =
+
const
struct file_operations ncp_file_operations =
{
.llseek = remote_llseek,
.read = ncp_file_read,
.write = ncp_file_write,
.ioctl = ncp_ioctl,
{
.llseek = remote_llseek,
.read = ncp_file_read,
.write = ncp_file_write,
.ioctl = ncp_ioctl,
+#ifdef CONFIG_COMPAT
+ .compat_ioctl = ncp_compat_ioctl,
+#endif
.mmap = ncp_mmap,
.release = ncp_release,
.fsync = ncp_fsync,
.mmap = ncp_mmap,
.release = ncp_release,
.fsync = ncp_fsync,