This version of nfsd_get_posix_acl uses getxattr instead of the discarded get_posix_acl inode operation. diff -Nur linux-2.5.43-mm1+/fs/nfsd/vfs.c linux-2.5.43-mm1++/fs/nfsd/vfs.c --- linux-2.5.43-mm1+/fs/nfsd/vfs.c 2002-10-16 05:27:53.000000000 +0200 +++ linux-2.5.43-mm1++/fs/nfsd/vfs.c 2002-10-16 23:02:39.000000000 +0200 @@ -42,6 +42,7 @@ #endif /* CONFIG_NFSD_V3 */ #include #include +#include #include @@ -1609,3 +1610,29 @@ nfsdstats.ra_size = cache_size; return 0; } + +#ifdef CONFIG_FS_POSIX_ACL +struct posix_acl * +nfsd_get_posix_acl(struct svc_fh *fhp, int type) +{ + struct inode *inode = fhp->fh_dentry->d_inode; + struct posix_acl *acl = NULL; + + if (IS_POSIXACL(inode)) { + int err, size = xattr_acl_size(64); /* reasonable max.size */ + void *buffer = kmalloc(size, GFP_KERNEL); + if (!buffer) + return ERR_PTR(-ENOMEM); + if (!fhp->fh_locked) + fh_lock(fhp); /* automatic unlocking */ + err = inode->i_op->getxattr(fhp->fh_dentry, + XATTR_NAME_ACL_ACCESS, + buffer, size); + acl = ERR_PTR(err); + if (err >= 0) + acl = posix_acl_from_xattr(buffer, err); + kfree(buffer); + } + return acl; +} +#endif