make get_file() return its argument
simplifies a bunch of callers... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
cecb46f194
commit
cb0942b812
16 changed files with 23 additions and 38 deletions
|
@ -1074,7 +1074,11 @@ struct file_handle {
|
|||
unsigned char f_handle[0];
|
||||
};
|
||||
|
||||
#define get_file(x) atomic_long_inc(&(x)->f_count)
|
||||
static inline struct file *get_file(struct file *f)
|
||||
{
|
||||
atomic_long_inc(&f->f_count);
|
||||
return f;
|
||||
}
|
||||
#define fput_atomic(x) atomic_long_add_unless(&(x)->f_count, -1, 1)
|
||||
#define file_count(x) atomic_long_read(&(x)->f_count)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue