patch-2.0.19 linux/fs/smbfs/file.c

Next file: linux/fs/smbfs/inode.c
Previous file: linux/fs/smbfs/dir.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.18/linux/fs/smbfs/file.c linux/fs/smbfs/file.c
@@ -32,7 +32,6 @@
 smb_make_open(struct inode *i, int right)
 {
         struct smb_dirent *dirent;
-        int open_result;
 
         if (i == NULL) {
                 printk("smb_make_open: got NULL inode\n");
@@ -45,13 +44,13 @@
 
         if ((dirent->opened) == 0) {
                 /* tries max. rights */
-                open_result = smb_proc_open(SMB_SERVER(i),
-                                            dirent->path, dirent->len,
-                                            dirent);
-                if (open_result) 
+		int open_result = smb_proc_open(SMB_SERVER(i),
+						dirent->path, dirent->len,
+						dirent);
+                if (open_result)
+		{
                         return open_result;
-
-                dirent->opened = 1;
+		}
         }
 
         if (   ((right == O_RDONLY) && (   (dirent->access == O_RDONLY)
@@ -142,7 +141,8 @@
 }
 
 static int 
-smb_file_write(struct inode *inode, struct file *file, const char *buf, int count)
+smb_file_write(struct inode *inode, struct file *file, const char *buf,
+	       int count)
 {
 	int result, bufsize, to_write, already_written;
         off_t pos;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov