sysfs.c (407da561244b9d51e6a794d6305ba38ec2c9d907) | sysfs.c (45c98f5a58f36c35ecf5a149cbf69cf5fd022120) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * f2fs sysfs interface 4 * 5 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 6 * http://www.samsung.com/ 7 * Copyright (c) 2017 Chao Yu <chao@kernel.org> 8 */ --- 497 unchanged lines hidden (view full) --- 506 } 507 508 if (!strcmp(a->attr.name, "gc_urgent")) { 509 if (t == 0) { 510 sbi->gc_mode = GC_NORMAL; 511 } else if (t == 1) { 512 sbi->gc_mode = GC_URGENT_HIGH; 513 if (sbi->gc_thread) { | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * f2fs sysfs interface 4 * 5 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 6 * http://www.samsung.com/ 7 * Copyright (c) 2017 Chao Yu <chao@kernel.org> 8 */ --- 497 unchanged lines hidden (view full) --- 506 } 507 508 if (!strcmp(a->attr.name, "gc_urgent")) { 509 if (t == 0) { 510 sbi->gc_mode = GC_NORMAL; 511 } else if (t == 1) { 512 sbi->gc_mode = GC_URGENT_HIGH; 513 if (sbi->gc_thread) { |
514 sbi->gc_thread->gc_wake = 1; | 514 sbi->gc_thread->gc_wake = true; |
515 wake_up_interruptible_all( 516 &sbi->gc_thread->gc_wait_queue_head); 517 wake_up_discard_thread(sbi, true); 518 } 519 } else if (t == 2) { 520 sbi->gc_mode = GC_URGENT_LOW; 521 } else if (t == 3) { 522 sbi->gc_mode = GC_URGENT_MID; 523 if (sbi->gc_thread) { | 515 wake_up_interruptible_all( 516 &sbi->gc_thread->gc_wait_queue_head); 517 wake_up_discard_thread(sbi, true); 518 } 519 } else if (t == 2) { 520 sbi->gc_mode = GC_URGENT_LOW; 521 } else if (t == 3) { 522 sbi->gc_mode = GC_URGENT_MID; 523 if (sbi->gc_thread) { |
524 sbi->gc_thread->gc_wake = 1; | 524 sbi->gc_thread->gc_wake = true; |
525 wake_up_interruptible_all( 526 &sbi->gc_thread->gc_wait_queue_head); 527 } 528 } else { 529 return -EINVAL; 530 } 531 return count; 532 } --- 908 unchanged lines hidden --- | 525 wake_up_interruptible_all( 526 &sbi->gc_thread->gc_wait_queue_head); 527 } 528 } else { 529 return -EINVAL; 530 } 531 return count; 532 } --- 908 unchanged lines hidden --- |