Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328978
b: refs/heads/master
c: b8318b0
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Sep 27, 2012
1 parent f5e9c02 commit ead0d62
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 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: ee97cd872d08b8623076f2a63ffb872d0884411a
refs/heads/master: b8318b01a8f7f760ae3ecae052ccc7fc123d9508
20 changes: 20 additions & 0 deletions trunk/fs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,26 @@ int expand_files(struct files_struct *files, int nr)
return expand_fdtable(files, nr);
}

static inline void __set_close_on_exec(int fd, struct fdtable *fdt)
{
__set_bit(fd, fdt->close_on_exec);
}

static inline void __clear_close_on_exec(int fd, struct fdtable *fdt)
{
__clear_bit(fd, fdt->close_on_exec);
}

static inline void __set_open_fd(int fd, struct fdtable *fdt)
{
__set_bit(fd, fdt->open_fds);
}

static inline void __clear_open_fd(int fd, struct fdtable *fdt)
{
__clear_bit(fd, fdt->open_fds);
}

static int count_open_files(struct fdtable *fdt)
{
int size = fdt->max_fds;
Expand Down
20 changes: 0 additions & 20 deletions trunk/include/linux/fdtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,11 @@ struct fdtable {
struct fdtable *next;
};

static inline void __set_close_on_exec(int fd, struct fdtable *fdt)
{
__set_bit(fd, fdt->close_on_exec);
}

static inline void __clear_close_on_exec(int fd, struct fdtable *fdt)
{
__clear_bit(fd, fdt->close_on_exec);
}

static inline bool close_on_exec(int fd, const struct fdtable *fdt)
{
return test_bit(fd, fdt->close_on_exec);
}

static inline void __set_open_fd(int fd, struct fdtable *fdt)
{
__set_bit(fd, fdt->open_fds);
}

static inline void __clear_open_fd(int fd, struct fdtable *fdt)
{
__clear_bit(fd, fdt->open_fds);
}

static inline bool fd_is_open(int fd, const struct fdtable *fdt)
{
return test_bit(fd, fdt->open_fds);
Expand Down

0 comments on commit ead0d62

Please sign in to comment.