]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/fcntl.c
Use f_lock to protect f_flags
[linux-2.6-omap-h63xx.git] / fs / fcntl.c
index bd215cc791da53eb9713063600a56ab3edb1c92a..04df8570a2d23c88f6340dd74bfb8bd7607a2cc8 100644 (file)
@@ -189,7 +189,9 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
                }
        }
 
+       spin_lock(&filp->f_lock);
        filp->f_flags = (arg & SETFL_MASK) | (filp->f_flags & ~SETFL_MASK);
+       spin_unlock(&filp->f_lock);
  out:
        unlock_kernel();
        return error;