Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 028f78a9 authored by Bobi Jam's avatar Bobi Jam Committed by Greg Kroah-Hartman
Browse files

staging/lustre/llite: protect from accessing NULL lli_clob



Need to check file's lli_clob object before calling
lov_read_and_clear_async_rc().

Signed-off-by: default avatarBobi Jam <bobijam.xu@intel.com>
Reviewed-by: default avatarJinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/23031
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8682


Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Reviewed-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a08a07c3
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -2328,10 +2328,12 @@ int ll_fsync(struct file *file, loff_t start, loff_t end, int datasync)
		lli->lli_async_rc = 0;
		if (rc == 0)
			rc = err;
		if (lli->lli_clob) {
			err = lov_read_and_clear_async_rc(lli->lli_clob);
			if (rc == 0)
				rc = err;
		}
	}

	err = md_sync(ll_i2sbi(inode)->ll_md_exp, ll_inode2fid(inode), &req);
	if (!rc)