Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.4.13-ac8 /fs/fcntl.c

Filename:/fs/fcntl.c
Lines Added:1
Lines Deleted:21
Also changed in: (Previous) 2.4.13-ac7  2.4.13-ac6  2.4.13-ac5  2.4.13-ac4  2.4.13-ac3  2.4.13-ac1 
(Following) 2.4.19-pre3-ac6  2.4.19-pre4-ac1  2.4.19-pre4-ac2  2.4.19-pre4-ac3  2.4.19-pre4-ac4  2.4.19-pre5-ac1 

Location
[  2.4.13-ac8
  [  fs
     o  fcntl.c

Patch

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/fcntl.c linux.ac/fs/fcntl.c
--- linux.vanilla/fs/fcntl.c   Mon Sep 17 21:16:30 2001
+++ linux.ac/fs/fcntl.c   Wed Oct 10 01:48:22 2001
@@ -10,7 +10,6 @@
 #include <linux/dnotify.h>
 #include <linux/smp_lock.h>
 #include <linux/slab.h>
-#include <linux/iobuf.h>
 
 #include <asm/poll.h>
 #include <asm/siginfo.h>
@@ -195,7 +194,7 @@
    return ret;
 }
 
-#define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | FASYNC | O_DIRECT)
+#define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | FASYNC)
 
 static int setfl(int fd, struct file * filp, unsigned long arg)
 {
@@ -216,25 +215,6 @@
          if (error < 0)
             return error;
       }
-   }
-
-   if (arg & O_DIRECT) {
-      /*
-       * alloc_kiovec() can sleep and we are only serialized by
-       * the big kernel lock here, so abuse the i_sem to serialize
-       * this case too. We of course wouldn't need to go deep down
-       * to the inode layer, we could stay at the file layer, but
-       * we don't want to pay for the memory of a semaphore in each
-       * file structure too and we use the inode semaphore that we just
-       * pay for anyways.
-       */
-      error = 0;
-      down(&inode->i_sem);
-      if (!filp->f_iobuf)
-         error = alloc_kiovec(1, &filp->f_iobuf);
-      up(&inode->i_sem);
-      if (error < 0)
-         return error;
    }
 
    /* required for strict SunOS emulation */


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.