1. 09 9月, 2010 6 次提交
  2. 27 8月, 2010 1 次提交
    • S
      Cannot allocate memory error on mount · f0138a79
      Suresh Jayaraman 提交于
      On 08/26/2010 01:56 AM, joe hefner wrote:
      > On a recent Fedora (13), I am seeing a mount failure message that I can not explain. I have a Windows Server 2003ýa with a share set up for access only for a specific username (say userfoo). If I try to mount it from Linux,ýusing userfoo and the correct password all is well. If I try with a bad password or with some other username (userbar), it fails with "Permission denied" as expected. If I try to mount as username = administrator, and give the correct administrator password, I would also expect "Permission denied", but I see "Cannot allocate memory" instead.
      
      > ýfs/cifs/netmisc.c: Mapping smb error code 5 to POSIX err -13
      > ýfs/cifs/cifssmb.c: Send error in QPathInfo = -13
      > ýCIFS VFS: cifs_read_super: get root inode failed
      
      Looks like the commit 0b8f18e3 assumed that cifs_get_inode_info() and
      friends fail only due to memory allocation error when the inode is NULL
      which is not the case if CIFSSMBQPathInfo() fails and returns an error.
      Fix this by propagating the actual error code back.
      Acked-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSuresh Jayaraman <sjayaraman@suse.de>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      f0138a79
  3. 26 8月, 2010 1 次提交
  4. 25 8月, 2010 1 次提交
  5. 24 8月, 2010 2 次提交
  6. 21 8月, 2010 1 次提交
  7. 20 8月, 2010 1 次提交
  8. 19 8月, 2010 1 次提交
  9. 17 8月, 2010 2 次提交
  10. 12 8月, 2010 1 次提交
  11. 10 8月, 2010 5 次提交
    • C
      cifs: truncate fallout · 1b947463
      Christoph Hellwig 提交于
      Remove the calls to inode_newsize_ok given that we already did it as
      part of inode_change_ok in the beginning of cifs_setattr_(no)unix.
      
      No need to call ->truncate if cifs doesn't have one, so remove the
      explicit call in cifs_vmtruncate, and replace the calls to vmtruncate
      with truncate_setsize which is vmtruncate minus inode_newsize_ok
      and the call to ->truncate.
      
      Rename cifs_vmtruncate to cifs_setsize to match the new calling conventions.
      
      Question 1:  why does cifs do the pagecache munging and i_size update twice
      	for each setattr call, once opencoded in cifs_vmtruncate, and once
      	using the VFS helpers?
      Question 2: what is supposed to be protected by i_lock in cifs_vmtruncate?
      	Do we need it around the call to inode_change_ok?
      
      [AV: fixed build breakage]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      1b947463
    • A
      convert remaining ->clear_inode() to ->evict_inode() · b57922d9
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      b57922d9
    • A
      Make ->drop_inode() just return whether inode needs to be dropped · 45321ac5
      Al Viro 提交于
      ... and let iput_final() do the actual eviction or retention
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      45321ac5
    • C
      always call inode_change_ok early in ->setattr · db78b877
      Christoph Hellwig 提交于
      Make sure we call inode_change_ok before doing any changes in ->setattr,
      and make sure to call it even if our fs wants to ignore normal UNIX
      permissions, but use the ATTR_FORCE to skip those.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      db78b877
    • C
      remove inode_setattr · 1025774c
      Christoph Hellwig 提交于
      Replace inode_setattr with opencoded variants of it in all callers.  This
      moves the remaining call to vmtruncate into the filesystem methods where it
      can be replaced with the proper truncate sequence.
      
      In a few cases it was obvious that we would never end up calling vmtruncate
      so it was left out in the opencoded variant:
      
       spufs: explicitly checks for ATTR_SIZE earlier
       btrfs,hugetlbfs,logfs,dlmfs: explicitly clears ATTR_SIZE earlier
       ufs: contains an opencoded simple_seattr + truncate that sets the filesize just above
      
      In addition to that ncpfs called inode_setattr with handcrafted iattrs,
      which allowed to trim down the opencoded variant.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      1025774c
  12. 06 8月, 2010 6 次提交
    • W
      DNS: Separate out CIFS DNS Resolver code · 1a4240f4
      Wang Lei 提交于
      Separate out the DNS resolver key type from the CIFS filesystem into its own
      module so that it can be made available for general use, including the AFS
      filesystem module.
      
      This facility makes it possible for the kernel to upcall to userspace to have
      it issue DNS requests, package up the replies and present them to the kernel
      in a useful form.  The kernel is then able to cache the DNS replies as keys
      can be retained in keyrings.
      
      Resolver keys are of type "dns_resolver" and have a case-insensitive
      description that is of the form "[<type>:]<domain_name>".  The optional <type>
      indicates the particular DNS lookup and packaging that's required.  The
      <domain_name> is the query to be made.
      
      If <type> isn't given, a basic hostname to IP address lookup is made, and the
      result is stored in the key in the form of a printable string consisting of a
      comma-separated list of IPv4 and IPv6 addresses.
      
      This key type is supported by userspace helpers driven from /sbin/request-key
      and configured through /etc/request-key.conf.  The cifs.upcall utility is
      invoked for UNC path server name to IP address resolution.
      
      The CIFS functionality is encapsulated by the dns_resolve_unc_to_ip() function,
      which is used to resolve a UNC path to an IP address for CIFS filesystem.  This
      part remains in the CIFS module for now.
      
      See the added Documentation/networking/dns_resolver.txt for more information.
      Signed-off-by: NWang Lei <wang840925@gmail.com>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      1a4240f4
    • J
      cifs: account for new creduid=0x%x parameter in spnego upcall string · ba5dadbf
      Jeff Layton 提交于
      The commit that added the creduid=0x%x parameter failed to increase the
      buffer allocation to account for it.
      Reported-by: NJ. Bruce Fields <bfields@fieldses.org>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      ba5dadbf
    • J
      cifs: reduce false positives with inode aliasing serverino autodisable · 5acfec25
      Jeff Layton 提交于
      It turns out that not all directory inodes with dentries on the
      i_dentry list are unusable here. We only consider them unusable if they
      are still hashed or if they have a root dentry attached.
      
      Full disclosure -- this check is inherently racy. There's nothing that
      stops someone from slapping a new dentry onto this inode just after
      this check, or hashing an existing one that's already attached. So,
      this is really a "best effort" thing to work around misbehaving servers.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      5acfec25
    • D
      CIFS: Make cifs_convert_address() take a const src pointer and a length · 67b7626a
      David Howells 提交于
      Make cifs_convert_address() take a const src pointer and a length so that all
      the strlen() calls in their can be cut out and to make it unnecessary to modify
      the src string.
      
      Also return the data length from dns_resolve_server_name_to_ip() so that a
      strlen() can be cut out of cifs_compose_mount_options() too.
      Acked-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      67b7626a
    • S
      cifs: show features compiled in as part of DebugData · f579903e
      Suresh Jayaraman 提交于
      Fixed the nit pointed out by Jeff.
      
      From: Suresh Jayaraman <sjayaraman@suse.de>
      Subject: [PATCH 1/2] cifs: show features compiled in as part of DebugData
      
      This patch adds the features that are compiled in to the CIFS debugging data
      as shown below:
      
      	$cat /proc/fs/cifs/DebugData
      	Display Internal CIFS Data Structures for Debugging
      	---------------------------------------------------
      	CIFS Version 1.64
      	Features: dfs fscache posix spnego xattr
      	Active VFS Requests: 0
      	...
      
      This patch provides a definitive way to tell what features are currently
      enabled in the running kernel. This could also help debugging.
      Signed-off-by: NSuresh Jayaraman <sjayaraman@suse.de>
      Cc: Jeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      f579903e
    • S
      cifs: update README · 95c99904
      Suresh Jayaraman 提交于
      Update the README file to reflect that now DebugData shows all
      the features enabled.
      Signed-off-by: NSuresh Jayaraman <sjayaraman@suse.de>
      Cc: Jeff Layton <jlayton@redhat.com>
      --
       fs/cifs/README |    5 +++--
       1 files changed, 3 insertions(+), 2 deletions(-)
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      95c99904
  13. 02 8月, 2010 12 次提交