diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-08-27 14:48:26 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-26 21:10:25 -0400 |
commit | cb0942b81249798e15c3f04eee2946ef543e8115 (patch) | |
tree | 7d494c580a847342577661782c5173f76178aa81 /include | |
parent | cecb46f194460d23cacf3b13593f9f5a4f7a0fed (diff) |
make get_file() return its argument
simplifies a bunch of callers...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fs.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index aa110476a95b..de1db1c12080 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1074,7 +1074,11 @@ struct file_handle { | |||
1074 | unsigned char f_handle[0]; | 1074 | unsigned char f_handle[0]; |
1075 | }; | 1075 | }; |
1076 | 1076 | ||
1077 | #define get_file(x) atomic_long_inc(&(x)->f_count) | 1077 | static inline struct file *get_file(struct file *f) |
1078 | { | ||
1079 | atomic_long_inc(&f->f_count); | ||
1080 | return f; | ||
1081 | } | ||
1078 | #define fput_atomic(x) atomic_long_add_unless(&(x)->f_count, -1, 1) | 1082 | #define fput_atomic(x) atomic_long_add_unless(&(x)->f_count, -1, 1) |
1079 | #define file_count(x) atomic_long_read(&(x)->f_count) | 1083 | #define file_count(x) atomic_long_read(&(x)->f_count) |
1080 | 1084 | ||