Watch
1
Fork
You've already forked kernel_a52xq
0
mirror of https://github.com/a52xq-dev/kernel.git synced 2026-10-20 22:58:12 +07:00

udf: Properly detect stale inodes

NFS can easily ask for inodes that are already deleted. Currently UDF
happily returns such inodes which is a bug. Return -ESTALE if
udf_read_inode() is asked to read deleted inode.

Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
Jan Kara 2014-09-04 16:19:47 +02:00
commit 4071b91362

View file

@ -1435,8 +1435,10 @@ reread:
read_unlock(&sbi->s_cred_lock);
link_count = le16_to_cpu(fe->fileLinkCount);
if (!link_count)
link_count = 1;
if (!link_count) {
ret = -ESTALE;
goto out;
}
set_nlink(inode, link_count);
inode->i_size = le64_to_cpu(fe->informationLength);