NFS: Optimise away an excessive GETATTR call when a file is symlinked

In the case when compiling via a symlink tree, we want to ensure that the
close-to-open GETATTR call is applied only to the final file, and not to
the symlink.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

+3 -1
+3 -1
fs/nfs/dir.c
··· 690 690 goto out_force; 691 691 /* This is an open(2) */ 692 692 if (nfs_lookup_check_intent(nd, LOOKUP_OPEN) != 0 && 693 - !(server->flags & NFS_MOUNT_NOCTO)) 693 + !(server->flags & NFS_MOUNT_NOCTO) && 694 + (S_ISREG(inode->i_mode) || 695 + S_ISDIR(inode->i_mode))) 694 696 goto out_force; 695 697 } 696 698 return nfs_revalidate_inode(server, inode);