diff options
Diffstat (limited to 'fs/nfsd/nfsproc.c')
| -rw-r--r-- | fs/nfsd/nfsproc.c | 11 | 
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c index e9214768cde9..010aff5c5a79 100644 --- a/fs/nfsd/nfsproc.c +++ b/fs/nfsd/nfsproc.c @@ -74,10 +74,10 @@ nfsd_proc_setattr(struct svc_rqst *rqstp, struct nfsd_sattrargs *argp,  	 * which only requires access, and "set-[ac]time-to-X" which  	 * requires ownership.  	 * So if it looks like it might be "set both to the same time which -	 * is close to now", and if inode_change_ok fails, then we +	 * is close to now", and if setattr_prepare fails, then we  	 * convert to "set to now" instead of "set to explicit time"  	 * -	 * We only call inode_change_ok as the last test as technically +	 * We only call setattr_prepare as the last test as technically  	 * it is not an interface that we should be using.  	 */  #define BOTH_TIME_SET (ATTR_ATIME_SET | ATTR_MTIME_SET) @@ -92,17 +92,15 @@ nfsd_proc_setattr(struct svc_rqst *rqstp, struct nfsd_sattrargs *argp,  		 * request is.  We require it be within 30 minutes of now.  		 */  		time_t delta = iap->ia_atime.tv_sec - get_seconds(); -		struct inode *inode;  		nfserr = fh_verify(rqstp, fhp, 0, NFSD_MAY_NOP);  		if (nfserr)  			goto done; -		inode = d_inode(fhp->fh_dentry);  		if (delta < 0)  			delta = -delta;  		if (delta < MAX_TOUCH_TIME_ERROR && -		    inode_change_ok(inode, iap) != 0) { +		    setattr_prepare(fhp->fh_dentry, iap) != 0) {  			/*  			 * Turn off ATTR_[AM]TIME_SET but leave ATTR_[AM]TIME.  			 * This will cause notify_change to set these times @@ -791,6 +789,7 @@ nfserrno (int errno)  		{ nfserr_toosmall, -ETOOSMALL },  		{ nfserr_serverfault, -ESERVERFAULT },  		{ nfserr_serverfault, -ENFILE }, +		{ nfserr_io, -EUCLEAN },  	};  	int	i; @@ -798,7 +797,7 @@ nfserrno (int errno)  		if (nfs_errtbl[i].syserr == errno)  			return nfs_errtbl[i].nfserr;  	} -	WARN(1, "nfsd: non-standard errno: %d\n", errno); +	WARN_ONCE(1, "nfsd: non-standard errno: %d\n", errno);  	return nfserr_io;  }  |