From: Zhang Qiang <zhangqiang.buaa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: users-JrjvKiOkagjYtjvyW6yDsg@public.gmane.org,
Ryusuke Konishi <ryusuke-sG5X7nlA6pw@public.gmane.org>
Cc: Zhang Qiang
<qiang.z.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Zhu Yanhai <yanhai.zhu-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Subject: [PATCH]nilfs2: An unassigned variable is assigned to a never used structure member
Date: Sun, 09 Aug 2009 19:13:10 +0800 [thread overview]
Message-ID: <4A7EAF46.6090302@gmail.com> (raw)
nilfs2: In procedure 'nilfs_get_sb()', when a nilfs filesysttem is mounted for the first time, local variable 'nilfs->ns_last_cno' is used before loading the latest checkpoint number from disk (in 'nilfs_fill_super'). 'nilfs->ns_last_cno' is assigned to 'sd.cno', but 'sd.cno' has never been used in the procedure.
Signed-off-by: Zhang Qiang <zhangqiang.buaa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
fs/nilfs2/super.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
index 8e2ec43..d8bfcfd 100644
--- a/fs/nilfs2/super.c
+++ b/fs/nilfs2/super.c
@@ -1125,10 +1125,6 @@ nilfs_get_sb(struct file_system_type *fs_type, int flags,
*/
sd.sbi = nilfs_find_sbinfo(nilfs, !(flags & MS_RDONLY), sd.cno);
- if (!sd.cno)
- /* trying to get the latest checkpoint. */
- sd.cno = nilfs_last_cno(nilfs);
-
/*
* Get super block instance holding the nilfs_sb_info struct.
* A new instance is allocated if no existing mount is present or
--
1.6.0.6
next reply other threads:[~2009-08-09 11:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-09 11:13 Zhang Qiang [this message]
[not found] ` <4A7EAF46.6090302-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-08-09 12:54 ` [PATCH]nilfs2: An unassigned variable is assigned to a never used structure member Ryusuke Konishi
[not found] ` <20090809.215419.08269814.ryusuke-sG5X7nlA6pw@public.gmane.org>
2009-08-10 1:05 ` Zhang Qiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A7EAF46.6090302@gmail.com \
--to=zhangqiang.buaa-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=qiang.z.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=ryusuke-sG5X7nlA6pw@public.gmane.org \
--cc=users-JrjvKiOkagjYtjvyW6yDsg@public.gmane.org \
--cc=yanhai.zhu-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.