Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182249
b: refs/heads/master
c: af61b96
h: refs/heads/master
i:
  182247: c81168c
v: v3
  • Loading branch information
Paul E. McKenney authored and Ingo Molnar committed Feb 25, 2010
1 parent 1fe31e2 commit 83c428f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7dc52157982ab771f40e3c0b7dc55b954c3c2d19
refs/heads/master: af61b96b4f68f7ab25ebf34fed275fabf64f2edc
11 changes: 7 additions & 4 deletions trunk/include/linux/fdtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,14 @@ struct files_struct {
struct file * fd_array[NR_OPEN_DEFAULT];
};

#define files_fdtable(files) \
(rcu_dereference_check((files)->fdt, \
#define rcu_dereference_check_fdtable(files, fdtfd) \
(rcu_dereference_check((fdtfd), \
rcu_read_lock_held() || \
lockdep_is_held(&(files)->file_lock) || \
atomic_read(&files->count) == 1))
atomic_read(&(files)->count) == 1))

#define files_fdtable(files) \
(rcu_dereference_check_fdtable((files), (files)->fdt))

struct file_operations;
struct vfsmount;
Expand All @@ -82,7 +85,7 @@ static inline struct file * fcheck_files(struct files_struct *files, unsigned in
struct fdtable *fdt = files_fdtable(files);

if (fd < fdt->max_fds)
file = rcu_dereference_check(fdt->fd[fd], rcu_read_lock_held() || lockdep_is_held(&files->file_lock) || atomic_read(&files->count) == 1);
file = rcu_dereference_check_fdtable(files, fdt->fd[fd]);
return file;
}

Expand Down

0 comments on commit 83c428f

Please sign in to comment.