mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 08:19:28 +00:00
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2: ocfs2: ocfs2_write_begin_nolock() should handle len=0 ocfs2: invalidate dentry if its dentry_lock isn't initialized.
This commit is contained in:
commit
ac7ac9f2b9
2 changed files with 13 additions and 2 deletions
|
@ -1747,8 +1747,8 @@ int ocfs2_write_begin_nolock(struct address_space *mapping,
|
||||||
* we know zeros will only be needed in the first and/or last cluster.
|
* we know zeros will only be needed in the first and/or last cluster.
|
||||||
*/
|
*/
|
||||||
if (clusters_to_alloc || extents_to_split ||
|
if (clusters_to_alloc || extents_to_split ||
|
||||||
wc->w_desc[0].c_needs_zero ||
|
(wc->w_clen && (wc->w_desc[0].c_needs_zero ||
|
||||||
wc->w_desc[wc->w_clen - 1].c_needs_zero)
|
wc->w_desc[wc->w_clen - 1].c_needs_zero)))
|
||||||
cluster_of_pages = 1;
|
cluster_of_pages = 1;
|
||||||
else
|
else
|
||||||
cluster_of_pages = 0;
|
cluster_of_pages = 0;
|
||||||
|
|
|
@ -85,6 +85,17 @@ static int ocfs2_dentry_revalidate(struct dentry *dentry,
|
||||||
goto bail;
|
goto bail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If the last lookup failed to create dentry lock, let us
|
||||||
|
* redo it.
|
||||||
|
*/
|
||||||
|
if (!dentry->d_fsdata) {
|
||||||
|
mlog(0, "Inode %llu doesn't have dentry lock, "
|
||||||
|
"returning false\n",
|
||||||
|
(unsigned long long)OCFS2_I(inode)->ip_blkno);
|
||||||
|
goto bail;
|
||||||
|
}
|
||||||
|
|
||||||
ret = 1;
|
ret = 1;
|
||||||
|
|
||||||
bail:
|
bail:
|
||||||
|
|
Loading…
Reference in a new issue