aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/base.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r--fs/proc/base.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 08e3eccf9a12..5eb02069e1b8 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1118,7 +1118,7 @@ static ssize_t oom_adjust_write(struct file *file, const char __user *buf,
1118 * Warn that /proc/pid/oom_adj is deprecated, see 1118 * Warn that /proc/pid/oom_adj is deprecated, see
1119 * Documentation/feature-removal-schedule.txt. 1119 * Documentation/feature-removal-schedule.txt.
1120 */ 1120 */
1121 WARN_ONCE(1, "%s (%d): /proc/%d/oom_adj is deprecated, please use /proc/%d/oom_score_adj instead.\n", 1121 printk_once(KERN_WARNING "%s (%d): /proc/%d/oom_adj is deprecated, please use /proc/%d/oom_score_adj instead.\n",
1122 current->comm, task_pid_nr(current), task_pid_nr(task), 1122 current->comm, task_pid_nr(current), task_pid_nr(task),
1123 task_pid_nr(task)); 1123 task_pid_nr(task));
1124 task->signal->oom_adj = oom_adjust; 1124 task->signal->oom_adj = oom_adjust;
@@ -1919,6 +1919,14 @@ static int proc_fd_info(struct inode *inode, struct path *path, char *info)
1919 spin_lock(&files->file_lock); 1919 spin_lock(&files->file_lock);
1920 file = fcheck_files(files, fd); 1920 file = fcheck_files(files, fd);
1921 if (file) { 1921 if (file) {
1922 unsigned int f_flags;
1923 struct fdtable *fdt;
1924
1925 fdt = files_fdtable(files);
1926 f_flags = file->f_flags & ~O_CLOEXEC;
1927 if (FD_ISSET(fd, fdt->close_on_exec))
1928 f_flags |= O_CLOEXEC;
1929
1922 if (path) { 1930 if (path) {
1923 *path = file->f_path; 1931 *path = file->f_path;
1924 path_get(&file->f_path); 1932 path_get(&file->f_path);
@@ -1928,7 +1936,7 @@ static int proc_fd_info(struct inode *inode, struct path *path, char *info)
1928 "pos:\t%lli\n" 1936 "pos:\t%lli\n"
1929 "flags:\t0%o\n", 1937 "flags:\t0%o\n",
1930 (long long) file->f_pos, 1938 (long long) file->f_pos,
1931 file->f_flags); 1939 f_flags);
1932 spin_unlock(&files->file_lock); 1940 spin_unlock(&files->file_lock);
1933 put_files_struct(files); 1941 put_files_struct(files);
1934 return 0; 1942 return 0;