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

Commit 4ae93560 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

NFSv4.1/pnfs: Don't ask for a read layout for an empty file.

parent 4a1e2feb
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1494,6 +1494,9 @@ pnfs_update_layout(struct inode *ino,
	if (!pnfs_enabled_sb(NFS_SERVER(ino)))
		goto out;

	if (iomode == IOMODE_READ && i_size_read(ino) == 0)
		goto out;

	if (pnfs_within_mdsthreshold(ctx, ino, iomode))
		goto out;