]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: linux seems to treat an illegal combinatino of O_RDWR, O_WRONLY and O_RDONLY...
authorSage Weil <sage@newdream.net>
Mon, 7 Apr 2008 13:36:31 +0000 (06:36 -0700)
committerSage Weil <sage@newdream.net>
Mon, 7 Apr 2008 13:36:31 +0000 (06:36 -0700)
src/kernel/super.h

index 771ac082ef76111f4493797587f004360798bc5e..cbf22bccd84b03b4b542aa73f03e3cd9e75b6a43 100644 (file)
@@ -290,9 +290,7 @@ static inline int ceph_file_mode(int flags)
                return FILE_MODE_WRONLY;
        if ((flags & O_ACCMODE) == O_RDONLY)
                return FILE_MODE_RDONLY;
-       BUG_ON(1);
-
-       return 0; /* remove compilation warning */
+       return FILE_MODE_RDWR;  /* not -EINVAL under Linux, strangely */
 }
 
 static inline struct ceph_client *ceph_inode_to_client(struct inode *inode)