Skip to content

Commit 1caf7a7

Browse files
bulwahnAl Viro
authored andcommitted
fs: drop unused fput_atomic definition
commit d7065da ("get rid of the magic around f_count in aio") added fput_atomic to include/linux/fs.h, motivated by its use in __aio_put_req() in fs/aio.c. Later, commit 3ffa3c0 ("aio: now fput() is OK from interrupt context; get rid of manual delayed __fput()") removed the only use of fput_atomic in __aio_put_req(), but did not remove the since then unused fput_atomic definition in include/linux/fs.h. We curate this now and finally remove the unused definition. This issue was identified during a code review due to a coccinelle warning from the atomic_as_refcounter.cocci rule pointing to the use of atomic_t in fput_atomic. Suggested-by: Krystian Radlak <[email protected]> Signed-off-by: Lukas Bulwahn <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent 15ade5d commit 1caf7a7

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

include/linux/fs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,6 @@ static inline struct file *get_file(struct file *f)
969969
#define get_file_rcu_many(x, cnt) \
970970
atomic_long_add_unless(&(x)->f_count, (cnt), 0)
971971
#define get_file_rcu(x) get_file_rcu_many((x), 1)
972-
#define fput_atomic(x) atomic_long_add_unless(&(x)->f_count, -1, 1)
973972
#define file_count(x) atomic_long_read(&(x)->f_count)
974973

975974
#define MAX_NON_LFS ((1UL<<31) - 1)

0 commit comments

Comments
 (0)