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:
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user