24 Sep, 2009
1 commit
-
Most call sites of unload_nls() do:
if (nls)
unload_nls(nls);Check the pointer inside unload_nls() like we do in kfree() and
simplify the call sites.Signed-off-by: Thomas Gleixner
Cc: Steve French
Cc: OGAWA Hirofumi
Cc: Roman Zippel
Cc: Dave Kleikamp
Cc: Petr Vandrovec
Cc: Anton Altaparmakov
Signed-off-by: Al Viro
09 Sep, 2009
1 commit
-
This avoids an indirect call in the VFS for each path component lookup.
Well, at least as long as you own the directory in question, and the ACL
check is unnecessary.Reviewed-by: James Morris
Acked-by: Serge Hallyn
Signed-off-by: Linus Torvalds
24 Jul, 2009
1 commit
-
BugLink: http://bugs.launchpad.net/ubuntu/+bug/396780
Commit 073aaa1b142461d91f83da66db1184d7c1b1edea "helpers for acl
caching + switch to those" introduced new helper functions for
acl handling but seems to have introduced a regression for jfs as
the acl is released before returning it to the caller, instead of
leaving this for the caller to do.
This causes the acl object to be used after freeing it, leading
to kernel panics in completely different places.Thanks to Christophe Dumez for reporting and bisecting into this.
Reported-by: Christophe Dumez
Tested-by: Christophe Dumez
Signed-off-by: Stefan Bader
Acked-by: Andy Whitcroft
Signed-off-by: Dave Kleikamp
25 Jun, 2009
1 commit
-
Signed-off-by: Al Viro
24 Jun, 2009
2 commits
-
helpers: get_cached_acl(inode, type), set_cached_acl(inode, type, acl),
forget_cached_acl(inode, type).ubifs/xattr.c needed includes reordered, the rest is a plain switchover.
Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
17 Jun, 2009
2 commits
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6:
jfs: fix regression preventing coalescing of extents -
Commit fec1878fe952b994125a3be7c94b1322db586f3b caused a regression in
which contiguous blocks being allocated to the end of an extent were
getting a new extent created. This typically results in files entirely
made up of 1-block extents even though the blocks are contiguous on
disk.Apparently grub doesn't handle a jfs file being fragmented into too many
extents, since it refuses to boot a kernel from jfs that was created by
the 2.6.30 kernel.Signed-off-by: Dave Kleikamp
Reported-by: Alex
12 Jun, 2009
2 commits
-
[xfs, btrfs, capifs, shmem don't need BKL, exempt]
Signed-off-by: Alessio Igor Bogani
Signed-off-by: Al Viro -
Move BKL into ->put_super from the only caller. A couple of
filesystems had trivial enough ->put_super (only kfree and NULLing of
s_fs_info + stuff in there) to not get any locking: coda, cramfs, efs,
hugetlbfs, omfs, qnx4, shmem, all others got the full treatment. Most
of them probably don't need it, but I'd rather sort that out individually.
Preferably after all the other BKL pushdowns in that area.[AV: original used to move lock_super() down as well; these changes are
removed since we don't do lock_super() at all in generic_shutdown_super()
now]
[AV: fuse, btrfs and xfs are known to need no damn BKL, exempt]Signed-off-by: Christoph Hellwig
Signed-off-by: Al Viro
24 May, 2009
1 commit
-
Jan Kucera found an missing call to mutex_unlock() with his static code
checker. It's an unlikely error path to hit in the real world, but it
should be fixed.Signed-off-by: Dave Kleikamp
Reported-by: Jan Kucera
07 Apr, 2009
1 commit
-
We should unlock &inode->i_mutex on the error path. This bug was
in ext2_quota_write(). I sent a patch to them today as well.Found by smatch (http://repo.or.cz/w/smatch.git). Compile tested.
regards,
dan carpenterSigned-off-by: Dan Carpenter
Signed-off-by: Dave Kleikamp
01 Apr, 2009
1 commit
-
current->fs->umask is what most of fs_struct users are doing.
Put that into a helper function.Signed-off-by: Al Viro
31 Mar, 2009
2 commits
-
Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy
as correctly noted at bug #12454. Someone can lookup entry with NULL
->owner, thus not pinning enything, and release it later resulting
in module refcount underflow.We can keep ->owner and supply it at registration time like ->proc_fops
and ->data.But this leaves ->owner as easy-manipulative field (just one C assignment)
and somebody will forget to unpin previous/pin current module when
switching ->owner. ->proc_fops is declared as "const" which should give
some thoughts.->read_proc/->write_proc were just fixed to not require ->owner for
protection.rmmod'ed directories will be empty and return "." and ".." -- no harm.
And directories with tricky enough readdir and lookup shouldn't be modular.
We definitely don't want such modular code.Removing ->owner will also make PDE smaller.
So, let's nuke it.
Kudos to Jeff Layton for reminding about this, let's say, oversight.
http://bugzilla.kernel.org/show_bug.cgi?id=12454
Signed-off-by: Alexey Dobriyan
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6:
jfs: needs crc32_le
jfs: Fix error handling in metapage_writepage()
jfs: return f_fsid for statfs(2)
jfs: remove xtLookupList()
jfs: clean up a dangling comment
28 Mar, 2009
2 commits
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (37 commits)
fs: avoid I_NEW inodes
Merge code for single and multiple-instance mounts
Remove get_init_pts_sb()
Move common mknod_ptmx() calls into caller
Parse mount options just once and copy them to super block
Unroll essentials of do_remount_sb() into devpts
vfs: simple_set_mnt() should return void
fs: move bdev code out of buffer.c
constify dentry_operations: rest
constify dentry_operations: configfs
constify dentry_operations: sysfs
constify dentry_operations: JFS
constify dentry_operations: OCFS2
constify dentry_operations: GFS2
constify dentry_operations: FAT
constify dentry_operations: FUSE
constify dentry_operations: procfs
constify dentry_operations: ecryptfs
constify dentry_operations: CIFS
constify dentry_operations: AFS
... -
Signed-off-by: Al Viro
26 Mar, 2009
1 commit
-
Use lowercase names of quota functions instead of old uppercase ones.
Signed-off-by: Jan Kara
Acked-by: Dave Kleikamp
03 Feb, 2009
2 commits
-
JFS needs crc32_le(), so select its library config symbol:
fs/built-in.o: In function `jfs_statfs':
super.c:(.text+0x7c8c0): undefined reference to `crc32_le'
super.c:(.text+0x7c8d5): undefined reference to `crc32_le'Signed-off-by: Randy Dunlap
Signed-off-by: Dave Kleikamp
31 Jan, 2009
1 commit
-
Improved error handling so that last_write_complete(), and thus
end_page_writeback(), gets called only once.Signed-off-by: Dave Kleikamp
Reported-by: Eric Sesterhenn
28 Jan, 2009
1 commit
-
This patch makes jfs return f_fsid info for statfs(2). By Andreas'
suggestion, this patch populates a persistent f_fsid between boots/mounts
with help of on-disk uuid record.Signed-off-by: Coly Li
Signed-off-by: Dave Kleikamp
22 Jan, 2009
1 commit
-
Signed-off-by: Alexey Dobriyan
10 Jan, 2009
3 commits
-
Currently, ext3 in mainline Linux doesn't have the freeze feature which
suspends write requests. So, we cannot take a backup which keeps the
filesystem's consistency with the storage device's features (snapshot and
replication) while it is mounted.In many case, a commercial filesystem (e.g. VxFS) has the freeze feature
and it would be used to get the consistent backup.If Linux's standard filesystem ext3 has the freeze feature, we can do it
without a commercial filesystem.So I have implemented the ioctls of the freeze feature.
I think we can take the consistent backup with the following steps.
1. Freeze the filesystem with the freeze ioctl.
2. Separate the replication volume or create the snapshot
with the storage device's feature.
3. Unfreeze the filesystem with the unfreeze ioctl.
4. Take the backup from the separated replication volume
or the snapshot.This patch:
VFS:
Changed the type of write_super_lockfs and unlockfs from "void"
to "int" so that they can return an error.
Rename write_super_lockfs and unlockfs of the super block operation
freeze_fs and unfreeze_fs to avoid a confusion.ext3, ext4, xfs, gfs2, jfs:
Changed the type of write_super_lockfs and unlockfs from "void"
to "int" so that write_super_lockfs returns an error if needed,
and unlockfs always returns 0.reiserfs:
Changed the type of write_super_lockfs and unlockfs from "void"
to "int" so that they always return 0 (success) to keep a current behavior.Signed-off-by: Takashi Sato
Signed-off-by: Masayuki Hamaguchi
Cc:
Cc:
Cc: Christoph Hellwig
Cc: Dave Kleikamp
Cc: Dave Chinner
Cc: Alasdair G Kergon
Cc: Al Viro
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
xtLookupList() was a more generalized version of xtLookup() with a
nastier interface. Its only caller, extHint(), is actually better
suited to using xtLookup() than xtLookupList(). This also lets us
remove the definition of lxd_t, an obnoxious packed structure that was
only used in-memory.Signed-off-by: Dave Kleikamp
-
viro cleaned up an hlist hack, but left a comment where it no longer
belongs. Combine the old comment with his new one.Signed-off-by: Dave Kleikamp
06 Jan, 2009
1 commit
-
We used to put them on a single list, without any locking. Racy.
Signed-off-by: Al Viro
01 Jan, 2009
1 commit
-
jfs version of Al Viro's nfsd race patches
Signed-off-by: Dave Kleikamp
Signed-off-by: Al Viro
31 Dec, 2008
1 commit
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6:
jfs: ensure symlinks are NUL-terminated
17 Dec, 2008
1 commit
-
This is an alternate fix for a bug reported and fixed by Duane Griffin.
Signed-off-by: Dave Kleikamp
Reported-by: Duane Griffin
14 Nov, 2008
1 commit
-
Wrap access to task credentials so that they can be separated more easily from
the task_struct during the introduction of COW creds.Change most current->(|e|s|fs)[ug]id to current_(|e|s|fs)[ug]id().
Change some task->e?[ug]id to task_e?[ug]id(). In some places it makes more
sense to use RCU directly rather than a convenient wrapper; these will be
addressed by later patches.Signed-off-by: David Howells
Reviewed-by: James Morris
Acked-by: Serge Hallyn
Acked-by: Dave Kleikamp
Cc: jfs-discussion@lists.sourceforge.net
Signed-off-by: James Morris
24 Oct, 2008
1 commit
-
* git://git.kernel.org/pub/scm/linux/kernel/git/viro/bdev: (66 commits)
[PATCH] kill the rest of struct file propagation in block ioctls
[PATCH] get rid of struct file use in blkdev_ioctl() BLKBSZSET
[PATCH] get rid of blkdev_locked_ioctl()
[PATCH] get rid of blkdev_driver_ioctl()
[PATCH] sanitize blkdev_get() and friends
[PATCH] remember mode of reiserfs journal
[PATCH] propagate mode through swsusp_close()
[PATCH] propagate mode through open_bdev_excl/close_bdev_excl
[PATCH] pass fmode_t to blkdev_put()
[PATCH] kill the unused bsize on the send side of /dev/loop
[PATCH] trim file propagation in block/compat_ioctl.c
[PATCH] end of methods switch: remove the old ones
[PATCH] switch sr
[PATCH] switch sd
[PATCH] switch ide-scsi
[PATCH] switch tape_block
[PATCH] switch dcssblk
[PATCH] switch dasd
[PATCH] switch mtd_blkdevs
[PATCH] switch mmc
...
23 Oct, 2008
2 commits
-
With this patch all directory fops instances that have a readdir
that doesn't take the BKL are switched to generic_file_llseek.Signed-off-by: Christoph Hellwig
-
Switch all users of d_alloc_anon to d_obtain_alias.
Signed-off-by: Christoph Hellwig
Signed-off-by: Al Viro
21 Oct, 2008
1 commit
-
Signed-off-by: Al Viro
14 Oct, 2008
1 commit
-
This is a much better version of a previous patch to make the parser
tables constant. Rather than changing the typedef, we put the "const" in
all the various places where its required, allowing the __initconst
exception for nfsroot which was the cause of the previous trouble.This was posted for review some time ago and I believe its been in -mm
since then.Signed-off-by: Steven Whitehouse
Cc: Alexander Viro
Signed-off-by: Linus Torvalds
27 Jul, 2008
2 commits
-
* kill nameidata * argument; map the 3 bits in ->flags anybody cares
about to new MAY_... ones and pass with the mask.
* kill redundant gfs2_iop_permission()
* sanitize ecryptfs_permission()
* fix remaining places where ->permission() instances might barf on new
MAY_... found in mask.The obvious next target in that direction is permission(9)
folded fix for nfs_permission() breakage from Miklos Szeredi
Signed-off-by: Al Viro
-
Kmem cache passed to constructor is only needed for constructors that are
themselves multiplexeres. Nobody uses this "feature", nor does anybody uses
passed kmem cache in non-trivial way, so pass only pointer to object.Non-trivial places are:
arch/powerpc/mm/init_64.c
arch/powerpc/mm/hugetlbpage.cThis is flag day, yes.
Signed-off-by: Alexey Dobriyan
Acked-by: Pekka Enberg
Acked-by: Christoph Lameter
Cc: Jon Tollefson
Cc: Nick Piggin
Cc: Matt Mackall
[akpm@linux-foundation.org: fix arch/powerpc/mm/hugetlbpage.c]
[akpm@linux-foundation.org: fix mm/slab.c]
[akpm@linux-foundation.org: fix ubifs]
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
26 Jul, 2008
1 commit
-
Move declarations of some macros, which should be in fact functions to
quotaops.h. This way they can be later converted to inline functions
because we can now use declarations from quota.h. Also add necessary
includes of quotaops.h to a few files.[akpm@linux-foundation.org: fix JFS build]
[akpm@linux-foundation.org: fix UFS build]
[vegard.nossum@gmail.com: fix QUOTA=n build]
Signed-off-by: Jan Kara
Cc: Vegard Nossum
Cc: Arjen Pool
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
11 Jun, 2008
1 commit
-
After fat gets fixed the unused DIRENTSIZ macro was the last user of
struct dirent we should get rid of since the kernel and userspace
versions differed.Signed-off-by: Adrian Bunk
Signed-off-by: Dave Kleikamp