aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorFred Isaman <iisaman@citi.umich.edu>2006-01-18 20:43:43 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-18 22:20:27 -0500
commit5274881992b8a632620f69346401da66e480a23b (patch)
treedc9535fb2c9f018d671f7864e1ee8c1395a6afc5 /fs
parent34081efc12aaaa12f20e5b59f3cb98ba6e27fb34 (diff)
[PATCH] nfsd4: clean up settattr code
Clean up some unnecessary special-casing in the setattr code.. Signed-off-by: Fred Isaman <iisaman@citi.umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfs4proc.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index b3f169f400db..a00fe8686293 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -594,10 +594,6 @@ nfsd4_setattr(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_se
594{ 594{
595 int status = nfs_ok; 595 int status = nfs_ok;
596 596
597 if (!current_fh->fh_dentry)
598 return nfserr_nofilehandle;
599
600 status = nfs_ok;
601 if (setattr->sa_iattr.ia_valid & ATTR_SIZE) { 597 if (setattr->sa_iattr.ia_valid & ATTR_SIZE) {
602 nfs4_lock_state(); 598 nfs4_lock_state();
603 status = nfs4_preprocess_stateid_op(current_fh, 599 status = nfs4_preprocess_stateid_op(current_fh,
@@ -799,17 +795,13 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
799 /* All operations except RENEW, SETCLIENTID, RESTOREFH 795 /* All operations except RENEW, SETCLIENTID, RESTOREFH
800 * SETCLIENTID_CONFIRM, PUTFH and PUTROOTFH 796 * SETCLIENTID_CONFIRM, PUTFH and PUTROOTFH
801 * require a valid current filehandle 797 * require a valid current filehandle
802 *
803 * SETATTR NOFILEHANDLE error handled in nfsd4_setattr
804 * due to required returned bitmap argument
805 */ 798 */
806 if ((!current_fh->fh_dentry) && 799 if ((!current_fh->fh_dentry) &&
807 !((op->opnum == OP_PUTFH) || (op->opnum == OP_PUTROOTFH) || 800 !((op->opnum == OP_PUTFH) || (op->opnum == OP_PUTROOTFH) ||
808 (op->opnum == OP_SETCLIENTID) || 801 (op->opnum == OP_SETCLIENTID) ||
809 (op->opnum == OP_SETCLIENTID_CONFIRM) || 802 (op->opnum == OP_SETCLIENTID_CONFIRM) ||
810 (op->opnum == OP_RENEW) || (op->opnum == OP_RESTOREFH) || 803 (op->opnum == OP_RENEW) || (op->opnum == OP_RESTOREFH) ||
811 (op->opnum == OP_RELEASE_LOCKOWNER) || 804 (op->opnum == OP_RELEASE_LOCKOWNER))) {
812 (op->opnum == OP_SETATTR))) {
813 op->status = nfserr_nofilehandle; 805 op->status = nfserr_nofilehandle;
814 goto encode_op; 806 goto encode_op;
815 } 807 }