diff options
| author | prabahar <none@none> | 2006-05-24 12:01:59 -0700 |
|---|---|---|
| committer | prabahar <none@none> | 2006-05-24 12:01:59 -0700 |
| commit | dd29fa4a741733485a5b868b0897983a7e6d8055 (patch) | |
| tree | a441189a80dc5501ba4568e818fb561493e96338 /usr/src/uts/common/syscall/acl.c | |
| parent | 49f91442e363055ed8b4f0f6e96c18703df6be90 (diff) | |
| download | illumos-joyent-dd29fa4a741733485a5b868b0897983a7e6d8055.tar.gz | |
5083170 need mechanism to report non-recoverable ESTALE error
Diffstat (limited to 'usr/src/uts/common/syscall/acl.c')
| -rw-r--r-- | usr/src/uts/common/syscall/acl.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/usr/src/uts/common/syscall/acl.c b/usr/src/uts/common/syscall/acl.c index 27ab1bbc26..7c77818ee7 100644 --- a/usr/src/uts/common/syscall/acl.c +++ b/usr/src/uts/common/syscall/acl.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -56,6 +55,7 @@ #include <sys/unistd.h> #include <sys/debug.h> +#include <fs/fs_subr.h> static int cacl(int cmd, int nentries, void *aclbufp, vnode_t *vp, int *rv); @@ -69,6 +69,7 @@ acl(const char *fname, int cmd, int nentries, void *aclbufp) struct vnode *vp; int error; int rv = 0; + int estale_retry = 0; /* Sanity check arguments */ if (fname == NULL) @@ -76,7 +77,7 @@ acl(const char *fname, int cmd, int nentries, void *aclbufp) lookup: error = lookupname((char *)fname, UIO_USERSPACE, FOLLOW, NULLVPP, &vp); if (error) { - if (error == ESTALE) + if ((error == ESTALE) && fs_need_estale_retry(estale_retry++)) goto lookup; return (set_errno(error)); } @@ -84,7 +85,7 @@ lookup: error = cacl(cmd, nentries, aclbufp, vp, &rv); VN_RELE(vp); if (error) { - if (error == ESTALE) + if ((error == ESTALE) && fs_need_estale_retry(estale_retry++)) goto lookup; return (set_errno(error)); } |
