diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 4eec540de9ea06bd95f6c6f0c9395c1e59214823..c4f918eca3d26d310fa65cdf9a11cec7c586bb45 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -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;