CHROMIUM: Remove "DP Hotplug" in mach-exynos.
[cascardo/linux.git] / fs / open.c
index 77becc0..18387ac 100644 (file)
--- a/fs/open.c
+++ b/fs/open.c
@@ -33,6 +33,9 @@
 
 #include "internal.h"
 
+#define CREATE_TRACE_POINTS
+#include <trace/events/fs.h>
+
 int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
        struct file *filp)
 {
@@ -836,7 +839,7 @@ EXPORT_SYMBOL(dentry_open);
 static void __put_unused_fd(struct files_struct *files, unsigned int fd)
 {
        struct fdtable *fdt = files_fdtable(files);
-       __FD_CLR(fd, fdt->open_fds);
+       __clear_open_fd(fd, fdt);
        if (fd < files->next_fd)
                files->next_fd = fd;
 }
@@ -987,6 +990,7 @@ long do_sys_open(int dfd, const char __user *filename, int flags, umode_t mode)
                        } else {
                                fsnotify_open(f);
                                fd_install(fd, f);
+                               trace_do_sys_open(tmp, flags, mode);
                        }
                }
                putname(tmp);
@@ -1080,7 +1084,7 @@ SYSCALL_DEFINE1(close, unsigned int, fd)
        if (!filp)
                goto out_unlock;
        rcu_assign_pointer(fdt->fd[fd], NULL);
-       FD_CLR(fd, fdt->close_on_exec);
+       __clear_close_on_exec(fd, fdt);
        __put_unused_fd(files, fd);
        spin_unlock(&files->file_lock);
        retval = filp_close(filp, files);