]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'for-3.14' of git://linux-nfs.org/~bfields/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 30 Jan 2014 18:18:43 +0000 (10:18 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 30 Jan 2014 18:18:43 +0000 (10:18 -0800)
Pull nfsd updates from Bruce Fields:
 - Handle some loose ends from the vfs read delegation support.
   (For example nfsd can stop breaking leases on its own in a
    fewer places where it can now depend on the vfs to.)
 - Make life a little easier for NFSv4-only configurations
   (thanks to Kinglong Mee).
 - Fix some gss-proxy problems (thanks Jeff Layton).
 - miscellaneous bug fixes and cleanup

* 'for-3.14' of git://linux-nfs.org/~bfields/linux: (38 commits)
  nfsd: consider CLAIM_FH when handing out delegation
  nfsd4: fix delegation-unlink/rename race
  nfsd4: delay setting current_fh in open
  nfsd4: minor nfs4_setlease cleanup
  gss_krb5: use lcm from kernel lib
  nfsd4: decrease nfsd4_encode_fattr stack usage
  nfsd: fix encode_entryplus_baggage stack usage
  nfsd4: simplify xdr encoding of nfsv4 names
  nfsd4: encode_rdattr_error cleanup
  nfsd4: nfsd4_encode_fattr cleanup
  minor svcauth_gss.c cleanup
  nfsd4: better VERIFY comment
  nfsd4: break only delegations when appropriate
  NFSD: Fix a memory leak in nfsd4_create_session
  sunrpc: get rid of use_gssp_lock
  sunrpc: fix potential race between setting use_gss_proxy and the upcall rpc_clnt
  sunrpc: don't wait for write before allowing reads from use-gss-proxy file
  nfsd: get rid of unused function definition
  Define op_iattr for nfsd4_open instead using macro
  NFSD: fix compile warning without CONFIG_NFSD_V3
  ...

1  2 
fs/nfsd/acl.h
fs/nfsd/nfs4acl.c
fs/nfsd/nfs4proc.c
fs/nfsd/vfs.c
fs/nfsd/vfs.h
net/sunrpc/cache.c
net/sunrpc/netns.h
net/sunrpc/xprtsock.c

diff --cc fs/nfsd/acl.h
index 8b68218e2c1c25c188f7585966dd9f694807e096,afd3e0eae642b903e6046b3b61e153b4ccba62bc..a812fd1b92a4593fc744606e5ae15ff128c8e2c7
@@@ -45,11 -43,15 +45,11 @@@ struct svc_rqst
  
  struct nfs4_acl *nfs4_acl_new(int);
  int nfs4_acl_get_whotype(char *, u32);
int nfs4_acl_write_who(int who, char *p);
__be32 nfs4_acl_write_who(int who, __be32 **p, int *len);
  
 -#define NFS4_ACL_TYPE_DEFAULT 0x01
 -#define NFS4_ACL_DIR          0x02
 -#define NFS4_ACL_OWNER                0x04
 -
 -struct nfs4_acl *nfs4_acl_posix_to_nfsv4(struct posix_acl *,
 -                              struct posix_acl *, unsigned int flags);
 -int nfs4_acl_nfsv4_to_posix(struct nfs4_acl *, struct posix_acl **,
 -                              struct posix_acl **, unsigned int flags);
 +int nfsd4_get_nfs4_acl(struct svc_rqst *rqstp, struct dentry *dentry,
 +              struct nfs4_acl **acl);
 +__be32 nfsd4_set_nfs4_acl(struct svc_rqst *rqstp, struct svc_fh *fhp,
 +              struct nfs4_acl *acl);
  
  #endif /* LINUX_NFS4_ACL_H */
index 649ad7cf22044bb10bd6cb64527cba7295226a97,eea24c9a561d95b7dbc641b262b066c4098e2226..d3a587144222b56becd0ce82597fb95bc8767592
  #include <linux/slab.h>
  #include <linux/nfs_fs.h>
  #include <linux/export.h>
 +#include "nfsfh.h"
+ #include "nfsd.h"
  #include "acl.h"
 +#include "vfs.h"
  
 +#define NFS4_ACL_TYPE_DEFAULT 0x01
 +#define NFS4_ACL_DIR          0x02
 +#define NFS4_ACL_OWNER                0x04
  
  /* mode bit translations: */
  #define NFS4_READ_MODE (NFS4_ACE_READ_DATA)
@@@ -916,17 -849,26 +917,22 @@@ nfs4_acl_get_whotype(char *p, u32 len
        return NFS4_ACL_WHO_NAMED;
  }
  
- int
- nfs4_acl_write_who(int who, char *p)
+ __be32 nfs4_acl_write_who(int who, __be32 **p, int *len)
  {
        int i;
+       int bytes;
  
        for (i = 0; i < ARRAY_SIZE(s2t_map); i++) {
-               if (s2t_map[i].type == who) {
-                       memcpy(p, s2t_map[i].string, s2t_map[i].stringlen);
-                       return s2t_map[i].stringlen;
-               }
+               if (s2t_map[i].type != who)
+                       continue;
+               bytes = 4 + (XDR_QUADLEN(s2t_map[i].stringlen) << 2);
+               if (bytes > *len)
+                       return nfserr_resource;
+               *p = xdr_encode_opaque(*p, s2t_map[i].string,
+                                       s2t_map[i].stringlen);
+               *len -= bytes;
+               return 0;
        }
-       BUG();
+       WARN_ON_ONCE(1);
        return -1;
  }
 -
 -EXPORT_SYMBOL(nfs4_acl_new);
 -EXPORT_SYMBOL(nfs4_acl_get_whotype);
 -EXPORT_SYMBOL(nfs4_acl_write_who);
Simple merge
diff --cc fs/nfsd/vfs.c
Simple merge
diff --cc fs/nfsd/vfs.h
Simple merge
Simple merge
Simple merge
Simple merge