- 21 Mar, 2012 5 commits
-
-
Jeff Layton authored
...ensure that we undo things in the reverse order from the way they were done. In truth, the ordering doesn't matter for a lot of these, but it's still better to do it that way to be sure. Signed-off-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
Jeff Layton authored
Take the #ifdef junk out of the code, and turn it into a noop macro when CONFIG_CIFS_DFS_UPCALL isn't defined. Signed-off-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
Pavel Shilovsky authored
It's the essential step before respecting MaxMpxCount value during negotiating because we will keep only one extra slot for sending echo requests. If there is no response during two echo intervals - reconnect the tcp session. Reviewed-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
no need to make that iput() conditional, just take it to the right place... Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 20 Mar, 2012 1 commit
-
-
Pavel Shilovsky authored
Some servers sets this value less than 50 that was hardcoded and we lost the connection if when we exceed this limit. Fix this by respecting this value - not sending more than the server allows. Cc: stable@kernel.org Reviewed-by:
Jeff Layton <jlayton@samba.org> Signed-off-by:
Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by:
Steve French <stevef@smf-gateway.(none)>
-
- 07 Jan, 2012 2 commits
-
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 04 Jan, 2012 1 commit
-
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 28 Oct, 2011 1 commit
-
-
Andi Kleen authored
The i_mutex lock use of generic _file_llseek hurts. Independent processes accessing the same file synchronize over a single lock, even though they have no need for synchronization at all. Under high utilization this can cause llseek to scale very poorly on larger systems. This patch does some rethinking of the llseek locking model: First the 64bit f_pos is not necessarily atomic without locks on 32bit systems. This can already cause races with read() today. This was discussed on linux-kernel in the past and deemed acceptable. The patch does not change that. Let's look at the different seek variants: SEEK_SET: Doesn't really need any locking. If there's a race one writer wins, the other loses. For 32bit the non atomic update races against read() stay the same. Without a lock they can also happen against write() now. The read() race was deemed acceptable in past discussions, and I think if it's ok for read it's ok for write too. => Don't need a lock. SEEK_END: This behaves like SEEK_SET plus it reads the maximum size too. Reading the maximum size would have the 32bit atomic problem. But luckily we already have a way to read the maximum size without locking (i_size_read), so we can just use that instead. Without i_mutex there is no synchronization with write() anymore, however since the write() update is atomic on 64bit it just behaves like another racy SEEK_SET. On non atomic 32bit it's the same as SEEK_SET. => Don't need a lock, but need to use i_size_read() SEEK_CUR: This has a read-modify-write race window on the same file. One could argue that any application doing unsynchronized seeks on the same file is already broken. But for the sake of not adding a regression here I'm using the file->f_lock to synchronize this. Using this lock is much better than the inode mutex because it doesn't synchronize between processes. => So still need a lock, but can use a f_lock. This patch implements this new scheme in generic_file_llseek. I dropped generic_file_llseek_unlocked and changed all callers. Signed-off-by:
Andi Kleen <ak@linux.intel.com> Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
- 20 Oct, 2011 1 commit
-
-
Steve French authored
Add support to print nostrictsync and noperm mount options in /proc/mounts for shares mounted with these options. (cleanup merge conflict in Sachin's original patch) Suggested-by:
Sachin Prabhu <sprabhu@redhat.com> Signed-off-by:
Steve French <smfrench@gmail.com>
-
- 19 Oct, 2011 1 commit
-
-
Jeff Layton authored
Signed-off-by:
Jeff Layton <jlayton@redhat.com>
-
- 14 Oct, 2011 1 commit
-
-
Pavel Shilovsky authored
that let us do local lock checks before requesting to the server. Signed-off-by:
Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by:
Steve French <smfrench@gmail.com>
-
- 13 Oct, 2011 3 commits
-
-
Steve French authored
Thus spake Jeff Layton: "Making that a module parm would allow you to set that parameter at boot time without needing to add special startup scripts. IMO, all of the procfile "switches" under /proc/fs/cifs should be module parms instead." This patch doesn't alter the default behavior (Oplocks are enabled by default). To disable oplocks when loading the module, use modprobe cifs enable_oplocks=0 (any of '0' or 'n' or 'N' conventions can be used). To disable oplocks at runtime using the new interface, use echo 0 > /sys/module/cifs/parameters/enable_oplocks The older /proc/fs/cifs/OplockEnabled interface will be deprecated after two releases. A subsequent patch will add an warning message about this deprecation. Changes since v2: - make enable_oplocks a 'bool' Changes since v1: - eliminate the use of extra variable by renaming the old one to enable_oplocks and make it an 'int' type. Reported-by:
Alexander Swen <alex@swen.nu> Reviewed-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Suresh Jayaraman <sjayaraman@suse.de> Signed-off-by:
Steve French <smfrench@gmail.com>
-
Paul Bolle authored
It should be 'CONFIG_CIFS_NFSD_EXPORT'. No-one noticed because that symbol depends on BROKEN. Signed-off-by:
Paul Bolle <pebolle@tiscali.nl> Signed-off-by:
Steve French <smfrench@gmail.com>
-
Jeff Layton authored
Signed-off-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Steve French <smfrench@gmail.com>
-
- 11 Oct, 2011 1 commit
-
-
Sachin Prabhu authored
Commit d39454ff adds a strictcache mount option. This patch allows the display of this mount option in /proc/mounts when listing shares mounted with the strictcache mount option. Signed-off-by:
Sachin Prabhu <sprabhu@redhat.com> Reviewed-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Steve French <smfrench@gmail.com>
-
- 20 Sep, 2011 1 commit
-
-
Pavel Shilovsky authored
move it to the beginning of the loop. Signed-off-by:
Pavel Shilovsky <piastryyy@gmail.com> Reviewed-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- 05 Aug, 2011 1 commit
-
-
Jeff Layton authored
The loop around lookup_one_len doesn't handle the case where it might return a negative dentry, which can cause an oops on the next pass through the loop. Check for that and break out of the loop with an error of -ENOENT if there is one. Fixes the panic reported here: https://bugzilla.redhat.com/show_bug.cgi?id=727927 Reported-by:
TR Bentley <home@trarbentley.net> Reported-by:
Iain Arnell <iarnell@gmail.com> Cc: Al Viro <viro@ZenIV.linux.org.uk> Cc: stable@kernel.org Signed-off-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- 31 Jul, 2011 1 commit
-
-
Jeff Layton authored
Currently, we take a sb->s_active reference and a cifsFileInfo reference when an oplock break workqueue job is queued. This is unnecessary and more complicated than it needs to be. Also as Al points out, deactivate_super has non-trivial locking implications so it's best to avoid that if we can. Instead, just cancel any pending oplock breaks for this filehandle synchronously in cifsFileInfo_put after taking it off the lists. That should ensure that this job doesn't outlive the structures it depends on. Reported-by:
Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- 21 Jul, 2011 1 commit
-
-
Josef Bacik authored
This converts everybody to handle SEEK_HOLE/SEEK_DATA properly. In some cases we just return -EINVAL, in others we do the normal generic thing, and in others we're simply making sure that the properly due-dilligence is done. For example in NFS/CIFS we need to make sure the file size is update properly for the SEEK_HOLE and SEEK_DATA case, but since it calls the generic llseek stuff itself that is all we have to do. Thanks, Signed-off-by:
Josef Bacik <josef@redhat.com> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 20 Jul, 2011 3 commits
-
-
Al Viro authored
not used by the instances anymore. Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
redundant; all callers get it duplicated in mask & MAY_NOT_BLOCK and none of them removes that bit. Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
its value depends only on inode and does not change; we might as well store it in ->i_op->check_acl and be done with that. Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 18 Jul, 2011 1 commit
-
-
Al Viro authored
Add missing ->i_mutex, convert to lookup_one_len() instead of (broken) open-coded analog, cope with getting something like a//b as relative pathname. Simplify the hell out of it, while we are there... Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk> Reviewed-by:
Jeff Layton <jlayton@redhat.com>
-
- 08 Jul, 2011 1 commit
-
-
Jeff Layton authored
Signed-off-by:
Jeff Layton <jlayton@redhat.com> Reviewed-by:
Pavel Shilovsky <piastryyy@gmail.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- 06 Jul, 2011 1 commit
-
-
Jeff Layton authored
...as that makes for a cumbersome interface. Make it take a regular smb_vol pointer and rely on the caller to zero it out if needed. Signed-off-by:
Jeff Layton <jlayton@redhat.com> Reviewed-by:
Pavel Shilovsky <piastryyy@gmail.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- 24 Jun, 2011 13 commits
-
-
Al Viro authored
... instead of just failing with -EINVAL Acked-by:
Pavel Shilovsky <piastryyy@gmail.com> Reviewed-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
Acked-by:
Pavel Shilovsky <piastryyy@gmail.com> Reviewed-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
if cifs_get_root() fails, we end up with ->mount() returning NULL, which is not what callers expect. Moreover, in case of superblock reuse we end up leaking a superblock reference... Acked-by:
Pavel Shilovsky <piastryyy@gmail.com> Reviewed-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
have ->s_fs_info set by the set() callback passed to sget() Acked-by:
Pavel Shilovsky <piastryyy@gmail.com> Reviewed-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
all callers of cifs_umount() proceed to do the same thing; pull it into cifs_umount() itself. Acked-by:
Pavel Shilovsky <piastryyy@gmail.com> Reviewed-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
instead of calling it manually in case if cifs_read_super() fails to set ->s_root, just call it from ->kill_sb(). cifs_put_super() is gone now *and* we have cifs_sb shutdown and destruction done after the superblock is gone from ->s_instances. Acked-by:
Pavel Shilovsky <piastryyy@gmail.com> Reviewed-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
... to the point prior to sget(). Now we have cifs_sb set up early enough. Acked-by:
Pavel Shilovsky <piastryyy@gmail.com> Reviewed-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
a) superblock argument is unused b) it always returns 0 Acked-by:
Pavel Shilovsky <piastryyy@gmail.com> Reviewed-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
no need to wait until cifs_read_super() and we need it done by the time cifs_mount() will be called. Acked-by:
Pavel Shilovsky <piastryyy@gmail.com> Reviewed-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
pull mountdata allocation up, so that it won't stand in the way when we lift cifs_mount() to location before sget(). Acked-by:
Pavel Shilovsky <piastryyy@gmail.com> Reviewed-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
cifs_sb and nls end up leaked... Acked-by:
Pavel Shilovsky <piastryyy@gmail.com> Reviewed-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
To close sget() races we'll need to be able to set cifs_sb up before we get the superblock, so we'll want to be able to do cifs_mount() earlier. Fortunately, it's easy to do - setting ->s_maxbytes can be done in cifs_read_super(), ditto for ->s_time_gran and as for putting MS_POSIXACL into ->s_flags, we can mirror it in ->mnt_cifs_flags until cifs_read_super() is called. Kill unused 'devname' argument, while we are at it... Acked-by:
Pavel Shilovsky <piastryyy@gmail.com> Reviewed-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
if cifs_sb allocation fails, we still need to drop nls we'd stashed into volume_info - the one we would've copied to cifs_sb if we could allocate the latter. Acked-by:
Pavel Shilovsky <piastryyy@gmail.com> Reviewed-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-