diff options
author | Yan, Zheng <zyan@redhat.com> | 2016-06-15 20:51:22 +0800 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2016-07-28 02:55:40 +0200 |
commit | fce8515741dfb6a233927262555295788ad22ca7 (patch) | |
tree | fcd383bba57d18d30bc6a983c2137d4908064fb8 /fs/ceph | |
parent | 9a5530c63889ac928a45c4645ab0bc23b4fbfcb8 (diff) | |
download | linux-stable-fce8515741dfb6a233927262555295788ad22ca7.tar.gz linux-stable-fce8515741dfb6a233927262555295788ad22ca7.tar.bz2 linux-stable-fce8515741dfb6a233927262555295788ad22ca7.zip |
ceph: fix NULL dereference in ceph_queue_cap_snap()
old_snapc->seq is used in dout(...)
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/snap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/snap.c b/fs/ceph/snap.c index 9caaa7ffc93f..eadf2c33edc6 100644 --- a/fs/ceph/snap.c +++ b/fs/ceph/snap.c @@ -551,7 +551,6 @@ void ceph_queue_cap_snap(struct ceph_inode_info *ci) ci->i_wrbuffer_ref_head = 0; capsnap->context = old_snapc; list_add_tail(&capsnap->ci_item, &ci->i_cap_snaps); - old_snapc = NULL; if (used & CEPH_CAP_FILE_WR) { dout("queue_cap_snap %p cap_snap %p snapc %p" @@ -563,6 +562,7 @@ void ceph_queue_cap_snap(struct ceph_inode_info *ci) __ceph_finish_cap_snap(ci, capsnap); } capsnap = NULL; + old_snapc = NULL; update_snapc: if (ci->i_head_snapc) { |