NFSD: Clean up nfsd_open_verified()
[sfrench/cifs-2.6.git] / fs / nfsd / vfs.c
index 0b0dbb8e08946ace082fb7bfc8617d5b145095ef..840e3af63a6f1a352f5179c6df8e10cc81ed87f7 100644 (file)
@@ -827,14 +827,23 @@ retry:
        return err;
 }
 
        return err;
 }
 
+/**
+ * nfsd_open_verified - Open a regular file for the filecache
+ * @rqstp: RPC request
+ * @fhp: NFS filehandle of the file to open
+ * @may_flags: internal permission flags
+ * @filp: OUT: open "struct file *"
+ *
+ * Returns an nfsstat value in network byte order.
+ */
 __be32
 __be32
-nfsd_open_verified(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type,
-               int may_flags, struct file **filp)
+nfsd_open_verified(struct svc_rqst *rqstp, struct svc_fh *fhp, int may_flags,
+                  struct file **filp)
 {
        __be32 err;
 
        validate_process_creds();
 {
        __be32 err;
 
        validate_process_creds();
-       err = __nfsd_open(rqstp, fhp, type, may_flags, filp);
+       err = __nfsd_open(rqstp, fhp, S_IFREG, may_flags, filp);
        validate_process_creds();
        return err;
 }
        validate_process_creds();
        return err;
 }