patch-2.1.78 linux/fs/ncpfs/file.c
Next file: linux/fs/ncpfs/inode.c
Previous file: linux/fs/ncpfs/dir.c
Back to the patch index
Back to the overall index
- Lines: 46
- Date:
Sun Jan 4 00:53:42 1998
- Orig file:
v2.1.77/linux/fs/ncpfs/file.c
- Orig date:
Wed Nov 12 13:34:27 1997
diff -u --recursive --new-file v2.1.77/linux/fs/ncpfs/file.c linux/fs/ncpfs/file.c
@@ -15,11 +15,12 @@
#include <linux/fcntl.h>
#include <linux/stat.h>
#include <linux/mm.h>
-#include <linux/ncp_fs.h>
#include <linux/locks.h>
-#include "ncplib_kernel.h"
#include <linux/malloc.h>
+#include <linux/ncp_fs.h>
+#include "ncplib_kernel.h"
+
static inline int min(int a, int b)
{
return a < b ? a : b;
@@ -65,7 +66,7 @@
result = ncp_open_create_file_or_subdir(NCP_SERVER(inode),
NULL, NULL, OC_MODE_OPEN,
0, AR_READ, &finfo);
- if (!result) {
+ if (result) {
#ifdef NCPFS_PARANOIA
printk(KERN_DEBUG "ncp_make_open: failed, result=%d\n", result);
#endif
@@ -82,11 +83,7 @@
#ifdef NCPFS_PARANOIA
printk(KERN_DEBUG "ncp_make_open: file open, access=%x\n", access);
#endif
- if (((right == O_RDONLY) && ((access == O_RDONLY)
- || (access == O_RDWR)))
- || ((right == O_WRONLY) && ((access == O_WRONLY)
- || (access == O_RDWR)))
- || ((right == O_RDWR) && (access == O_RDWR)))
+ if (access == right || access == O_RDWR)
error = 0;
out_unlock:
@@ -231,7 +228,7 @@
}
}
- inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+ inode->i_mtime = inode->i_atime = CURRENT_TIME;
file->f_pos = pos;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov