mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-03 19:26:01 -04:00
NFSv4.1/pnfs: Don't ask for a read layout for an empty file.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user