]> git.pld-linux.org Git - packages/kernel.git/blame - linux-2.4.20-odirect.patch
- obsolete
[packages/kernel.git] / linux-2.4.20-odirect.patch
CommitLineData
2c4f4c6a 1diff -urNp linux-1290/fs/fcntl.c linux-1300/fs/fcntl.c
2--- linux-1290/fs/fcntl.c
3+++ linux-1300/fs/fcntl.c
4@@ -199,7 +199,7 @@ asmlinkage long sys_dup(unsigned int fil
5 return ret;
6 }
7
8-#define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | FASYNC | O_DIRECT)
9+#define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | FASYNC)
10
11 static int setfl(int fd, struct file * filp, unsigned long arg)
12 {
13@@ -222,25 +222,6 @@ static int setfl(int fd, struct file * f
14 }
15 }
16
17- if (arg & O_DIRECT) {
18- /*
19- * alloc_kiovec() can sleep and we are only serialized by
20- * the big kernel lock here, so abuse the i_sem to serialize
21- * this case too. We of course wouldn't need to go deep down
22- * to the inode layer, we could stay at the file layer, but
23- * we don't want to pay for the memory of a semaphore in each
24- * file structure too and we use the inode semaphore that we just
25- * pay for anyways.
26- */
27- error = 0;
28- down(&inode->i_sem);
29- if (!filp->f_iobuf)
30- error = alloc_kiovec(1, &filp->f_iobuf);
31- up(&inode->i_sem);
32- if (error < 0)
33- return error;
34- }
35-
36 /* required for strict SunOS emulation */
37 if (O_NONBLOCK != O_NDELAY)
38 if (arg & O_NDELAY)
39diff -urNp linux-1290/fs/open.c linux-1300/fs/open.c
40--- linux-1290/fs/open.c
41+++ linux-1300/fs/open.c
42@@ -642,6 +642,8 @@ struct file *filp_open(const char * file
43 {
44 int namei_flags, error;
45 struct nameidata nd;
46+
47+ flags &= ~O_DIRECT;
48
49 namei_flags = flags;
50 if ((namei_flags+1) & O_ACCMODE)
This page took 0.344273 seconds and 4 git commands to generate.