res_counter: delete res_counter_write()
Subsystems (2)
PATCH 1/1 res_counter: delete res_counter_write()
Since 628f423553 "memcg: limit change shrink usage" both res_counter_write() and write_strategy_fn have been unused. This patch deletes them both.
Signed-off-by Greg Thelen <[email protected]>
--- include/linux/res_counter.h | 5 ----- kernel/res_counter.c | 22 ---------------------- 2 files changed, 0 insertions(+), 27 deletions(-)
include/linux/res_counter.h +0 -5
@@ -74,14 +74,9 @@ ssize_t res_counter_read(struct res_counter *counter, int member, const char __user *buf, size_t nbytes, loff_t *pos, int (*read_strategy)(unsigned long long val, char *s)); -typedef int (*write_strategy_fn )(const char *buf,unsigned long long *val); -int res_counter_memparse_write_strategy (const char *buf,unsigned long long *res); -int res_counter_write (struct res_counter *counter,int member, -const char *buffer,write_strategy_fn write_strategy); -/* * the field descriptors. one for each member of res_counter */
kernel/res_counter.c +0 -22
@@ -198,25 +198,3 @@ int res_counter_memparse_write_strategy(const char *buf, *res =PAGE_ALIGN (*res);return 0 ; } - -int res_counter_write (struct res_counter *counter,int member, -const char *buf,write_strategy_fn write_strategy) -{ -char *end; -unsigned long flags; -unsigned long long tmp, *val; - -if (write_strategy) { -if (write_strategy (buf, &tmp)) -return -EINVAL ; - }else { - tmp =simple_strtoull (buf, &end,10 ); -if (*end !='\0' ) -return -EINVAL ; - } -spin_lock_irqsave (&counter->lock, flags); - val =res_counter_member (counter, member); - *val = tmp; -spin_unlock_irqrestore (&counter->lock, flags); -return 0 ; -}
Signature · 7 lines
1.7.7.3 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 5 lines · Greg Thelen
Since
628f423553"memcg: limit change shrink usage" bothres_counter_write()andwrite_strategy_fnhave been unused. This patch deletes them both.Signed-off-by Greg Thelen <[email protected]>
Thank you
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>