linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][Trivial] f2fs: Use list_for_each_entry rather than  list_for_each_entry_safe.
@ 2013-05-14 12:06 majianpeng
  2013-05-15  4:45 ` Jaegeuk Kim
  0 siblings, 1 reply; 3+ messages in thread
From: majianpeng @ 2013-05-14 12:06 UTC (permalink / raw)
  To: jaegeuk.kim; +Cc: linux-fsdevel, linux-f2fs-devel

Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
---
 fs/f2fs/debug.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c
index 8d99437..0d6c6aa 100644
--- a/fs/f2fs/debug.c
+++ b/fs/f2fs/debug.c
@@ -175,12 +175,12 @@ get_cache:
 
 static int stat_show(struct seq_file *s, void *v)
 {
-    struct f2fs_stat_info *si, *next;
+    struct f2fs_stat_info *si;
     int i = 0;
     int j;
 
     mutex_lock(&f2fs_stat_mutex);
-    list_for_each_entry_safe(si, next, &f2fs_stat_list, stat_list) {
+    list_for_each_entry(si, &f2fs_stat_list, stat_list) {
         char devname[BDEVNAME_SIZE];
 
         update_general_status(si->sbi);
-- 
1.8.3.rc1.44.gb387c77


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH][Trivial] f2fs: Use list_for_each_entry rather than list_for_each_entry_safe.
  2013-05-14 12:06 [PATCH][Trivial] f2fs: Use list_for_each_entry rather than list_for_each_entry_safe majianpeng
@ 2013-05-15  4:45 ` Jaegeuk Kim
  2013-05-15  6:36   ` majianpeng
  0 siblings, 1 reply; 3+ messages in thread
From: Jaegeuk Kim @ 2013-05-15  4:45 UTC (permalink / raw)
  To: majianpeng; +Cc: linux-fsdevel, linux-f2fs-devel

[-- Attachment #1: Type: text/plain, Size: 907 bytes --]

Hi Jianpeng,

Could you explain why this *should* be changed?
Thanks,

2013-05-14 (화), 20:06 +0800, majianpeng:
> Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
> ---
>  fs/f2fs/debug.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c
> index 8d99437..0d6c6aa 100644
> --- a/fs/f2fs/debug.c
> +++ b/fs/f2fs/debug.c
> @@ -175,12 +175,12 @@ get_cache:
>  
>  static int stat_show(struct seq_file *s, void *v)
>  {
> -    struct f2fs_stat_info *si, *next;
> +    struct f2fs_stat_info *si;
>      int i = 0;
>      int j;
>  
>      mutex_lock(&f2fs_stat_mutex);
> -    list_for_each_entry_safe(si, next, &f2fs_stat_list, stat_list) {
> +    list_for_each_entry(si, &f2fs_stat_list, stat_list) {
>          char devname[BDEVNAME_SIZE];
>  
>          update_general_status(si->sbi);

-- 
Jaegeuk Kim
Samsung

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][Trivial] f2fs: Use list_for_each_entry rather than list_for_each_entry_safe.
  2013-05-15  4:45 ` Jaegeuk Kim
@ 2013-05-15  6:36   ` majianpeng
  0 siblings, 0 replies; 3+ messages in thread
From: majianpeng @ 2013-05-15  6:36 UTC (permalink / raw)
  To: jaegeuk.kim; +Cc: linux-fsdevel, linux-f2fs-devel

On 05/15/2013 12:45 PM, Jaegeuk Kim wrote:
> Hi Jianpeng,
>
> Could you explain why this *should* be changed?
> Thanks,
>
> 2013-05-14 (화), 20:06 +0800, majianpeng:
>> Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
>> ---
>>  fs/f2fs/debug.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c
>> index 8d99437..0d6c6aa 100644
>> --- a/fs/f2fs/debug.c
>> +++ b/fs/f2fs/debug.c
>> @@ -175,12 +175,12 @@ get_cache:
>>  
>>  static int stat_show(struct seq_file *s, void *v)
>>  {
>> -    struct f2fs_stat_info *si, *next;
>> +    struct f2fs_stat_info *si;
>>      int i = 0;
>>      int j;
>>  
>>      mutex_lock(&f2fs_stat_mutex);
>> -    list_for_each_entry_safe(si, next, &f2fs_stat_list, stat_list) {
>> +    list_for_each_entry(si, &f2fs_stat_list, stat_list) {
>>          char devname[BDEVNAME_SIZE];
>>  
>>          update_general_status(si->sbi);
Hi,
In general, if we want to do delete operation like list_delete(&si->stat_list) ,we can use list_for_each_entry_safe.
Otherwise, we used list_for_each_entry.

Thanks!
Jianpeng Ma
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-15  6:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-14 12:06 [PATCH][Trivial] f2fs: Use list_for_each_entry rather than list_for_each_entry_safe majianpeng
2013-05-15  4:45 ` Jaegeuk Kim
2013-05-15  6:36   ` majianpeng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).