From: Andreas Gruenbacher <agruen@suse.de>

With NFSv2 we would try to follow a NULL getacl and setacl function pointer
here.  Add the missing checks.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/fs/nfs/dir.c |    3 +++
 1 files changed, 3 insertions(+)

diff -puN fs/nfs/dir.c~nfsacl-acl-umask-handling-workaround-in-nfs-client-fix fs/nfs/dir.c
--- 25/fs/nfs/dir.c~nfsacl-acl-umask-handling-workaround-in-nfs-client-fix	2005-01-24 17:36:02.285538912 -0800
+++ 25-akpm/fs/nfs/dir.c	2005-01-24 17:36:02.289538304 -0800
@@ -984,6 +984,9 @@ static int nfs_set_default_acl(struct in
 	struct posix_acl *dfacl, *acl;
 	int error = 0;
 
+	if (NFS_PROTO(inode)->version != 3 ||
+	    !NFS_PROTO(dir)->getacl || !NFS_PROTO(inode)->setacls)
+		return 0;
 	dfacl = NFS_PROTO(dir)->getacl(dir, ACL_TYPE_DEFAULT);
 	if (IS_ERR(dfacl)) {
 		error = PTR_ERR(dfacl);
_