fs: drop unused fput_atomic definition
Subsystems (2)
PATCH RESEND 1/1 fs: drop unused fput_atomic definition
commit d7065da03822 ("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 3ffa3c0e3f6e ("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.
---
v1:
- sent on 2018-01-12, got no response
https://lore.kernel.org/lkml/[email protected]/
v1 resend:
- rebased to v5.1-rc4
- added Jens to recipient list as he touched the place lately closeby
in commit 091141a42e15 ("fs: add fget_many() and fput_many()")- compile-tested with defconfig on v5.1-rc4 and next-20190410
include/linux/fs.h | 1 - 1 file changed, 1 deletion(-)
include/linux/fs.h +0 -1
@@ -969,7 +969,6 @@ static inline struct file *get_file(struct file *f)#define get_file_rcu_many (x, cnt) \ atomic_long_add_unless(&(x)->f_count, (cnt), 0)#define get_file_rcu (x) get_file_rcu_many((x), 1) -#define fput_atomic (x) atomic_long_add_unless(&(x)->f_count, -1, 1)#define file_count (x) atomic_long_read(&(x)->f_count)#define MAX_NON_LFS ((1UL<<31) - 1)
Signature · 1 line
2.17.1
Looks good,
Signature · 6 lines
Johannes Thumshirn SUSE Labs Filesystems [email protected] +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850