Commit graph android_kernel_sony_sdm845/fs
Message SHA1
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
David Woodhouse   commited 2005-08-27 14:30:07 +02:00
efda945204
[PATCH] Fix oops in sysfs_hash_and_remove_file()
The problem arises if an entity in sysfs is created and removed without
ever having been made completely visible.  In SCSI this is triggered by
removing a device while it's initialising.

The problem appears to be that because it was never made visible in sysfs,
the sysfs dentry has a null d_inode which oopses when a reference is made
to it.  The solution is simply to check d_inode and assume the object was
never made visible (and thus doesn't need deleting) if it's NULL.

(akpm: possibly a stopgap for 2.6.13 scsi problems.  May not be the
long-term fix)

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

James Bottomley   authored and   Linus Torvalds   commited 2005-08-26 19:37:13 -07:00
36676bcbf9
[PATCH] Fix oops in fs/locks.c on close of file with pending locks
The recent change to locks_remove_flock code in fs/locks.c changes how
byte range locks are removed from closing files, which shows up a bug in
cifs.

The assumption in the cifs code was that the close call sent to the
server would remove any pending locks on the server on this file, but
that is no longer safe as the fs/locks.c code on the client wants unlock
of 0 to PATH_MAX to remove all locks (at least from this client, it is
not possible AFAIK to remove all locks from other clients made to the
server copy of the file).

Note that cifs locks are different from posix locks - and it is not
possible to map posix locks perfectly on the wire yet, due to
restrictions of the cifs network protocol, even to Samba without adding
a new request type to the network protocol (which we plan to do for
Samba 3.0.21 within a few months), but the local client will have the
correct, posix view, of the lock in most cases.

The correct fix for cifs for this would involve a bigger change than I
would like to do this late in the 2.6.13-rc cycle - and would involve
cifs keeping track of all unmerged (uncoalesced) byte range locks for
each remote inode and scanning that list to remove locks that intersect
or fall wholly within the range - locks that intersect may have to be
reaquired with the smaller, remaining range.

Signed-off-by: Steve French <sfrench@us.ibm.com>
Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Steve French   authored and   Linus Torvalds   commited 2005-08-26 16:05:35 -07:00
d634cc15e8
[PATCH] hppfs: fix symlink error path
While touching this code I noticed the error handling is bogus, so I
fixed it up.

I've removed the IS_ERR(proc_dentry) check, which will never trigger and
is clearly a typo: we must check proc_file instead.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Paolo 'Blaisorblade' Giarrusso   authored and   Linus Torvalds   commited 2005-08-26 11:39:19 -07:00
fd589e0b66
[PATCH] Fixup symlink function pointers for hppfs [for 2.6.13]
Update hppfs for the symlink functions prototype change.

Yes, I know the code I leave there is still _bogus_, see next patch for
this.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Paolo 'Blaisorblade' Giarrusso   authored and   Linus Torvalds   commited 2005-08-26 11:39:19 -07:00
d7a60d50d7
[PATCH] Document idr_get_new_above() semantics, update inotify
There is an off by one problem with idr_get_new_above.

The comment and function name suggest that it will return an id >
starting_id, but it actually returned an id >= starting_id, and kernel
callers other than inotify treated it as such.

The patch below fixes the comment, and fixes inotifys usage.  The
function name still doesn't match the behaviour, but it never did.

Signed-off-by: John McCutchan <ttb@tentacle.dhs.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

John McCutchan   authored and   Linus Torvalds   commited 2005-08-26 11:32:57 -07:00
7c657f2f25
[CIFS] Support for legacy servers part 3 - Add support for Open and most
of Read support.

Signed-off-by: Steve French <sfrench@us.ibm.com>

Steve French   commited 2005-08-24 23:06:05 -07:00
a9d02ad490
[CIFS] Use file instead of dentry in cifs dir_notify struct
Signed-off-by: Steve French <sfrench@us.ibm.com>

Steve French   commited 2005-08-24 20:25:21 -07:00
e22cb8bcb8
[CIFS] Change notify support part 3
Signed-off-by: Steve French <sfrench@us.ibm.com>

Steve French   commited 2005-08-24 20:03:11 -07:00
167a251ad6
[CIFS] Missing line from previous patch
Signed-off-by: Steve French (sfrench@us.ibm.com)

Steve French   commited 2005-08-24 18:51:02 -07:00
abb15b8ae4
[CIFS] Change notify support part 2
Signed-off-by: Asser Ferno <asser@diku.dk>
Signed-off-by: Steve French <sfrench@us.ibm.com> and lightly modified

Steve French   commited 2005-08-24 17:10:36 -07:00
ff5dbd9ead
[CIFS] Update thanks/contributor list with Miklos Szeredi
(Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
also should have been listed on the last cifs patch fixing some lookup
intent handling in cifs)

Signed-off-by: Steve French <sfrench@us.ibm.com>

Steve French   commited 2005-08-24 14:43:14 -07:00
e2a98a7543
CIFS: Fix typos in fs/cifs/CHANGES
Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>

Steve French   commited 2005-08-24 14:01:13 -07:00
c0c3e8edaa
CIFS: Reduce CONFIG_CIFS_STATS ifdefs
Make cifs_stats code conditional in the header files to avoid ifdefs in the
main code.

Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>

Steve French   commited 2005-08-24 13:59:35 -07:00
a454434758
[CIFS] Support for mounting to older servers part 2. Add support for
legacy getattr (lookup).

Signed-off-by: Steve French (sfrench@us.ibm.com)

Steve French   commited 2005-08-23 20:26:03 -07:00
6b8edfe0f9
[CIFS] Support for mounting to older, pre-CIFS servers added. This
allows specifying an RFC1001 target "called" name (netbios name of the
server, which can now be pecified as mount option "servernetbiosname"
but will eventually be passed in automatically on retry of host down
error messages caused when server refuses to handle default server
name and can not handle port 445). This is an important step, but
additional testing and fixup is needed to add remaining function needed
for these.

Signed-off-by: Steve French (sfrench@us.ibm.com)

Steve French   commited 2005-08-22 21:38:31 -07:00
a10faeb2a3
[CIFS] Finish up of case-insensitive dentry handling for cifs. This
will eventually (or should eventually) be common code for jfs, smbfs,
etc. but in the meantime is small enough and necessary when mounting
case insensitive to Windows (nocase).

Signed-off-by: Shaggy (shaggy@austin.ibm.com)
Signed-off-by: Steve French (sfrench@us.ibm.com)

Steve French   commited 2005-08-22 20:09:43 -07:00
b92327fe6b
[CIFS] Make CIFS statistics more accurate and add some stats that were
missing.  Most importantly SMB reads were undercounted.

Signed-off-by: Steve French (sfrench@us.ibm.com)

Steve French   commited 2005-08-20 21:42:53 -07:00
a5a2b489ba
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Steve French   commited 2005-08-20 21:40:00 -07:00
646352319b
Don't allow normal users to set idle IO priority
It has all the normal priority inversion problems.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Linus Torvalds   commited 2005-08-20 18:51:29 -07:00
f6fdd7d9c2
[PATCH] freevxfs: fix breakage introduced by symlink fixes
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Alexey Dobriyan   authored and   Linus Torvalds   commited 2005-08-20 14:30:50 -07:00
a5ea169c95
befs: fix up missed follow_link declaration change
We'd updated the prototype and the return value, but not the function
declaration itself.

Linus Torvalds   commited 2005-08-20 13:20:01 -07:00
db873896d1
[ARM] fs/adfs/adfs.h: "extern inline" doesn't make sense
"extern inline" doesn't make sense.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Adrian Bunk   authored and   Russell King   commited 2005-08-20 17:20:28 +01:00
e0c93142ce
[PATCH] NFSv4: unbalanced BKL in nfs_atomic_lookup()
Added missing unlock_kernel() to NFSv4 atomic lookup.

Signed-off-by: Steve Dickson <steved@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Steve Dickson   authored and   Linus Torvalds   commited 2005-08-19 18:44:56 -07:00
01c314a0c0
[PATCH] Fix up symlink function pointers
This fixes up the symlink functions for the calling convention change:

 * afs, autofs4, befs, devfs, freevxfs, jffs2, jfs, ncpfs, procfs,
   smbfs, sysvfs, ufs, xfs - prototype change for ->follow_link()
 * befs, smbfs, xfs - same for ->put_link()

Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Al Viro   authored and   Linus Torvalds   commited 2005-08-19 18:08:21 -07:00
008b150a3c
Fix nasty ncpfs symlink handling bug.
This bug could cause oopses and page state corruption, because ncpfs
used the generic page-cache symlink handlign functions.  But those
functions only work if the page cache is guaranteed to be "stable", ie a
page that was installed when the symlink walk was started has to still
be installed in the page cache at the end of the walk.

We could have fixed ncpfs to not use the generic helper routines, but it
is in many ways much cleaner to instead improve on the symlink walking
helper routines so that they don't require that absolute stability.

We do this by allowing "follow_link()" to return a error-pointer as a
cookie, which is fed back to the cleanup "put_link()" routine.  This
also simplifies NFS symlink handling.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Linus Torvalds   commited 2005-08-19 18:02:56 -07:00
cc314eef01
[PATCH] jffs2: fix symlink error handling
The current calling conventions for ->follow_link() are already fairly
complex.

What we have is
	1) you can return -error; then you must release nameidata yourself
	   and ->put_link() will _not_ be called.
	2) you can do nd_set_link(nd, ERR_PTR(-error)) and return 0
	3) you can do nd_set_link(nd, path) and return 0
	4) you can return 0 (after having moved nameidata yourself)

jffs2 follow_link() is broken - it has an exit where it returns
-EIO and leaks nameidata.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Al Viro   authored and   Linus Torvalds   commited 2005-08-19 17:57:19 -07:00
2fb1e3086d
[CIFS] Finish cifs mount option which requests case insensitive path
name matching.

	Signed-off-by:  Steve French (sfrench@us.ibm.com)

Steve French   commited 2005-08-19 11:04:29 -07:00
d3485d37c0
Merge with /home/shaggy/git/linus-clean/
Dave Kleikamp   commited 2005-08-19 10:37:59 -05:00
01fa90cb2f
[CIFS] Add mount option for disabling sending byte range lock requests
over the wire (to help the case when applications break with cifs mandatory
lock behavior.  Add part one of mount option for requesting case
insensitive path name matching.

Signed-off-by: Steve French (sfrench@us.ibm.com)

Steve French   commited 2005-08-18 20:49:57 -07:00
c46fa8acdc
[PATCH] reiserfs+acl+quota deadlock fix
When i_acl_default is set to some error we do not hold the lock (hence we
are not allowed to drop it and reacquire later).

Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Chris Mason <mason@suse.com>
Cc: <reiserfs-dev@namesys.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Jan Kara   authored and   Linus Torvalds   commited 2005-08-18 12:53:57 -07:00
d86c390ffb
[PATCH] NFS: Introduce the use of inode->i_lock to protect fields in nfsi
Down the road we want to eliminate the use of the global kernel lock entirely
from the NFS client.  To do this, we need to protect the fields in the
nfs_inode structure adequately.  Start by serializing updates to the
"cache_validity" field.

Note this change addresses an SMP hang found by njw@osdl.org, where processes
deadlock because nfs_end_data_update and nfs_revalidate_mapping update the
"cache_validity" field without proper serialization.

Test plan:
 Millions of fsx ops on SMP clients.  Run Nick Wilson's breaknfs program on
 large SMP clients.

Signed-off-by: Chuck Lever <cel@netapp.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Chuck Lever   authored and   Linus Torvalds   commited 2005-08-18 12:53:57 -07:00
dc59250c6e
[PATCH] NFS: use atomic bitops to manipulate flags in nfsi->flags
Introduce atomic bitops to manipulate the bits in the nfs_inode structure's
"flags" field.

Using bitops means we can use a generic wait_on_bit call instead of an ad hoc
locking scheme in fs/nfs/inode.c, so we can remove the "nfs_i_wait" field from
nfs_inode at the same time.

The other new flags field will continue to use bitmask and logic AND and OR.
This permits several flags to be set at the same time efficiently.  The
following patch adds a spin lock to protect these flags, and this spin lock
will later cover other fields in the nfs_inode structure, amortizing the cost
of using this type of serialization.

Test plan:
 Millions of fsx ops on SMP clients.

Signed-off-by: Chuck Lever <cel@netapp.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Chuck Lever   authored and   Linus Torvalds   commited 2005-08-18 12:53:56 -07:00
412d582ec1
[PATCH] NFS: split nfsi->flags into two fields
Certain bits in nfsi->flags can be manipulated with atomic bitops, and some
are better manipulated via logical bitmask operations.

This patch splits the flags field into two.  The next patch introduces atomic
bitops for one of the fields.

Test plan:
 Millions of fsx ops on SMP clients.

Signed-off-by: Chuck Lever <cel@netapp.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Chuck Lever   authored and   Linus Torvalds   commited 2005-08-18 12:53:56 -07:00
5529680981
[CIFS] Change Notify support part 1 - add dnotify thread for processing
notify responses.

Signed-off-by: Asser Ferno  <asser@diku.dk>
Signed-off-by: Steve French <sfrench@us.ibm.com>

Steve French   commited 2005-08-18 09:41:43 -07:00
8d0d50948b
[CIFS] rmmod cifs can oops if done soon after the last cifs unmount
Signed-off-by: Shaggy (shaggy@austin.ibm.com)
Signed-off-by: Steve French (sfrench@us.ibm.com)

Steve French   commited 2005-08-18 09:37:34 -07:00
f191401f59
Merge master.kernel.org:/pub/scm/linux/kernel/git/aia21/ntfs-2.6
Linus Torvalds   commited 2005-08-17 14:56:22 -07:00
099d44e869
[PATCH] nfsd to unlock kernel before exiting
The nfsd holds the big kernel lock upon exit, when it really shouldn't.
Not to mention that this breaks Ingo's RT patch. This is a trivial fix
to release the lock.

Ingo, this patch also works with your kernel, and stops the problem with
nfsd.

Note, there's a "goto out;" where "out:" is right above svc_exit_thread.
The point of the goto also holds the kernel_lock, so I don't see any
problem here in releasing it.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Steven Rostedt   authored and   Linus Torvalds   commited 2005-08-17 12:53:05 -07:00
c4f92dba97
[CIFS] Ensure that cifs multiplex ids do not collide.
Signed-off-by: Steve French (sfrench@us.ibm.com)

Steve French   commited 2005-08-17 12:38:22 -07:00
1982c344f1
[CIFS] Missing ; from previous fix. Pointed out by Shaggy.
Signed-off-by: Steve French

Steve French   commited 2005-08-17 12:12:19 -07:00
a59c658607
JFS: Initialize dentry->d_op for negative dentries too
Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>

Dave Kleikamp   commited 2005-08-17 13:53:13 -05:00
686762c804
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
David Woodhouse   commited 2005-08-17 14:37:55 +01:00
327b6b08d6
Merge head 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/shaggy/jfs-2.6
Linus Torvalds   commited 2005-08-16 12:12:30 -07:00
5153f7e6db
NTFS: Complete the previous fix for the unset device when mapping buffers
for  mft record writing.  I had missed the writepage based mft record
      write code path.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-08-16 19:42:56 +01:00
481d037421
Merge master.kernel.org:/pub/scm/linux/kernel/git/aia21/ntfs-2.6
Linus Torvalds   commited 2005-08-16 09:31:28 -07:00
cf59001235
[PATCH] NFS: Ensure we always update inode->i_mode when doing O_EXCL creates
When the client performs an exclusive create and opens the file for writing,
a Netapp filer will first create the file using the mode 01777. It does this
since an NFSv3/v4 exclusive create cannot immediately set the mode bits.
The 01777 mode then gets put into the inode->i_mode. After the file creation
is successful, we then do a setattr to change the mode to the correct value
(as per the NFS spec).

The problem is that nfs_refresh_inode() no longer updates inode->i_mode, so
the latter retains the 01777 mode. A bit later, the VFS notices this, and calls
remove_suid(). This of course now resets the file mode to inode->i_mode & 0777.
Hey presto, the file mode on the server is now magically changed to 0777. Duh...

Fixes http://bugzilla.linux-nfs.org/show_bug.cgi?id=32

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Trond Myklebust   authored and   Linus Torvalds   commited 2005-08-16 09:30:58 -07:00
65e4308d25
[PATCH] NFS: Ensure ACL xdr code doesn't overflow.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Trond Myklebust   authored and   Linus Torvalds   commited 2005-08-16 08:52:11 -07:00
58fcb8df0b
NTFS: Fix bug in mft record writing where we forgot to set the device in
the buffers when mapping them after the VM had discarded them.
      Thanks to Martin MOKREJŠ for the bug report.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov   commited 2005-08-16 16:38:28 +01:00
e74589ac25
[PATCH] inotify: add MOVE_SELF event
This adds a MOVE_SELF event to inotify.  It is sent whenever the inode
you are watching is moved.  We need this event so that we can catch
something like this:

 - app1:
	watch /etc/mtab

 - app2:
	cp /etc/mtab /tmp/mtab-work
	mv /etc/mtab /etc/mtab~
	mv /tmp/mtab-work /etc/mtab

app1 still thinks it's watching /etc/mtab but it's actually watching
/etc/mtab~.

Signed-off-by: John McCutchan <ttb@tentacle.dhs.org>
Signed-off-by: Robert Love <rml@novell.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

John McCutchan   authored and   Linus Torvalds   commited 2005-08-15 09:50:31 -07:00
89204c40a0
[PATCH] inotify: fix idr_get_new_above usage
We are saving the wrong thing in ->last_wd.  We want the wd, not the
return value.

Signed-off-by: Robert Love <rml@novell.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Robert Love   authored and   Linus Torvalds   commited 2005-08-15 09:48:31 -07:00
0bf955ce98