[Ocfs2-commits] mfasheh commits r2392 - trunk/fs/ocfs2

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Tue Jun 14 13:29:03 CDT 2005


Author: mfasheh
Signed-off-by: zab
Date: 2005-06-14 13:29:02 -0500 (Tue, 14 Jun 2005)
New Revision: 2392

Modified:
   trunk/fs/ocfs2/file.c
Log:
* Remove ocfs2_valid_open and the O_DIRECT open checks.

Signed-off-by: zab



Modified: trunk/fs/ocfs2/file.c
===================================================================
--- trunk/fs/ocfs2/file.c	2005-06-13 22:58:43 UTC (rev 2391)
+++ trunk/fs/ocfs2/file.c	2005-06-14 18:29:02 UTC (rev 2392)
@@ -61,24 +61,6 @@
 	return sync_mapping_buffers(inode->i_mapping);
 }
 
-/* Checks an open request against our currently open mode */
-static inline int ocfs2_valid_open(int mode, int open_direct)
-{
-	int ret = 1;
-	int writing;
-
-	writing = (mode & O_RDWR) || (mode & O_WRONLY);
-
-	if (mode & O_DIRECT) {
-		if (!open_direct)
-			ret = 0;
-	} else {
-		if (open_direct && writing)
-			ret = 0;
-	}
-	return ret;
-}
-
 static int ocfs2_file_open(struct inode *inode, struct file *file)
 {
 	int status;
@@ -100,15 +82,6 @@
 		goto leave;
 	}
 
-	if (oi->ip_open_count &&
-	    !ocfs2_valid_open(mode, 
-			      oi->ip_flags & OCFS2_INODE_OPEN_DIRECT)) {
-		spin_unlock(&oi->ip_lock);
-
-		status = -EACCES;
-		goto leave;
-	}
-
 	if (mode & O_DIRECT)
 		oi->ip_flags |= OCFS2_INODE_OPEN_DIRECT;
 



More information about the Ocfs2-commits mailing list