]> git.neil.brown.name Git - history.git/commitdiff
Merge home.transmeta.com:/home/torvalds/v2.5/linux
authorLinus Torvalds <torvalds@home.transmeta.com>
Tue, 3 Sep 2002 05:41:02 +0000 (22:41 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Tue, 3 Sep 2002 05:41:02 +0000 (22:41 -0700)
into home.transmeta.com:/home/torvalds/v2.5/sigio

1  2 
fs/fcntl.c
fs/locks.c
include/net/inet_common.h
include/net/sock.h
net/ipv4/af_inet.c
net/ipv4/tcp_input.c
net/ipv4/tcp_minisocks.c
net/ipv6/af_inet6.c
net/socket.c

diff --cc fs/fcntl.c
index b26bdbcb2930f40f327b64ebaced937adfb28efe,7500d2699a10c1254ff56a654f1f227005398976..c68baf1f81da442e3d0990f70d24a2deb39899e8
@@@ -244,21 -251,44 +244,50 @@@ static int setfl(int fd, struct file * 
                                return -EINVAL;
        }
  
 -      /* required for strict SunOS emulation */
 -      if (O_NONBLOCK != O_NDELAY)
 -             if (arg & O_NDELAY)
 -                 arg |= O_NONBLOCK;
 +      lock_kernel();
 +      if ((arg ^ filp->f_flags) & FASYNC) {
 +              if (filp->f_op && filp->f_op->fasync) {
 +                      error = filp->f_op->fasync(fd, filp, (arg & FASYNC) != 0);
 +                      if (error < 0)
 +                              goto out;
 +              }
 +      }
  
        filp->f_flags = (arg & SETFL_MASK) | (filp->f_flags & ~SETFL_MASK);
 -      return 0;
 + out:
 +      unlock_kernel();
 +      return error;
  }
  
+ static void f_modown(struct file *filp, unsigned long pid,
+                      uid_t uid, uid_t euid, int force)
+ {
+       write_lock_irq(&filp->f_owner.lock);
+       if (force || !filp->f_owner.pid) {
+               filp->f_owner.pid = pid;
+               filp->f_owner.uid = uid;
+               filp->f_owner.euid = euid;
+       }
+       write_unlock_irq(&filp->f_owner.lock);
+ }
+ int f_setown(struct file *filp, unsigned long arg, int force)
+ {
+       int err;
+       
+       err = security_ops->file_set_fowner(filp);
+       if (err)
+               return err;
+       f_modown(filp, arg, current->uid, current->euid, force);
+       return 0;
+ }
+ void f_delown(struct file *filp)
+ {
+       f_modown(filp, 0, 0, 0, 1);
+ }
  static long do_fcntl(unsigned int fd, unsigned int cmd,
                     unsigned long arg, struct file * filp)
  {
diff --cc fs/locks.c
Simple merge
Simple merge
index ccf82ecab360e4e90a7256b42e907b5954e4d1ec,fc617efe24764b048fb2c9e93148022b945825b8..da47601e429097f0c4e88b97927fcc9aba15c9fb
@@@ -130,9 -130,8 +130,8 @@@ struct sock 
                                bsdism;
        unsigned char           debug;
        unsigned char           rcvtstamp;
 -      /* Hole of 1 byte. Try to pack. */
 +      unsigned char           no_largesend;
        int                     route_caps;
-       int                     proc;
        unsigned long           lingertime;
  
        int                     hashent;
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc net/socket.c
Simple merge