25 May, 2010
3 commits
-
When wb_writeback() hasn't written anything it will re-acquire the inode
lock before calling inode_wait_for_writeback.This change tests the sync bit first so that is doesn't need to drop &
re-acquire the lock if the inode became available while wb_writeback() was
waiting to get the lock.Signed-off-by: Richard Kennedy
Cc: Alexander Viro
Cc: Jens Axboe
Cc: Wu Fengguang
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
…tion by not migrating temporary stacks
Page migration requires rmap to be able to find all ptes mapping a page
at all times, otherwise the migration entry can be instantiated, but it
is possible to leave one behind if the second rmap_walk fails to find
the page. If this page is later faulted, migration_entry_to_page() will
call BUG because the page is locked indicating the page was migrated by
the migration PTE not cleaned up. For examplekernel BUG at include/linux/swapops.h:105!
invalid opcode: 0000 [#1] PREEMPT SMP
...
Call Trace:
[<ffffffff810e951a>] handle_mm_fault+0x3f8/0x76a
[<ffffffff8130c7a2>] do_page_fault+0x44a/0x46e
[<ffffffff813099b5>] page_fault+0x25/0x30
[<ffffffff8114de33>] load_elf_binary+0x152a/0x192b
[<ffffffff8111329b>] search_binary_handler+0x173/0x313
[<ffffffff81114896>] do_execve+0x219/0x30a
[<ffffffff8100a5c6>] sys_execve+0x43/0x5e
[<ffffffff8100320a>] stub_execve+0x6a/0xc0
RIP [<ffffffff811094ff>] migration_entry_wait+0xc1/0x129There is a race between shift_arg_pages and migration that triggers this
bug. A temporary stack is setup during exec and later moved. If
migration moves a page in the temporary stack and the VMA is then removed
before migration completes, the migration PTE may not be found leading to
a BUG when the stack is faulted.This patch causes pages within the temporary stack during exec to be
skipped by migration. It does this by marking the VMA covering the
temporary stack with an otherwise impossible combination of VMA flags.
These flags are cleared when the temporary stack is moved to its final
location.[kamezawa.hiroyu@jp.fujitsu.com: idea for having migration skip temporary stacks]
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Rik van Riel <riel@redhat.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Minchan Kim <minchan.kim@gmail.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> -
If !CONFIG_HUGETLB_PAGE, pagemap_hugetlb_range() is never called. So put
it (and its calling function) into #ifdef block.Signed-off-by: Naoya Horiguchi
Acked-by: Matt Mackall
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
24 May, 2010
5 commits
-
* 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing:
uml: Pushdown the bkl from harddog_kern ioctl
sunrpc: Pushdown the bkl from sunrpc cache ioctl
sunrpc: Pushdown the bkl from ioctl
autofs4: Pushdown the bkl from ioctl
uml: Convert to unlocked_ioctls to remove implicit BKL
ncpfs: BKL ioctl pushdown
coda: Clean-up whitespace problems in pioctl.c
coda: BKL ioctl pushdown
drivers: Push down BKL into various drivers
isdn: Push down BKL into ioctl functions
scsi: Push down BKL into ioctl functions
dvb: Push down BKL into ioctl functions
smbfs: Push down BKL into ioctl function
coda/psdev: Remove BKL from ioctl function
um/mmapper: Remove BKL usage
sn_hwperf: Kill BKL usage
hfsplus: Push down BKL into ioctl function -
* 'for-linus' of git://git.open-osd.org/linux-open-osd:
exofs: confusion between kmap() and kmap_atomic() api
exofs: Add default address_space_operations -
* git://git.kernel.org/pub/scm/linux/kernel/git/hirofumi/fatfs-2.6:
fat: convert to unlocked_ioctl
fat: Cleanup nls_unload() usage
fat: use pack_hex_byte() instead of custom one -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
9p: Optimize TCREATE by eliminating a redundant fid clone.
9p: cleanup: remove unneeded assignment
9p: Add mksock support
fs/9p: Make sure we properly instantiate dentry.
9p: add 9P2000.L rename operation
9p: add 9P2000.L statfs operation
9p: VFS switches for 9p2000.L: VFS switches
9p: VFS switches for 9p2000.L: protocol and client changes -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (59 commits)
ceph: reuse mon subscribe message instead of allocated anew
ceph: avoid resending queued message to monitor
ceph: Storage class should be before const qualifier
ceph: all allocation functions should get gfp_mask
ceph: specify max_bytes on readdir replies
ceph: cleanup pool op strings
ceph: Use kzalloc
ceph: use common helper for aborted dir request invalidation
ceph: cope with out of order (unsafe after safe) mds reply
ceph: save peer feature bits in connection structure
ceph: resync headers with userland
ceph: use ceph. prefix for virtual xattrs
ceph: throw out dirty caps metadata, data on session teardown
ceph: attempt mds reconnect if mds closes our session
ceph: clean up send_mds_reconnect interface
ceph: wait for mds OPEN reply to indicate reconnect success
ceph: only send cap releases when mds is OPEN|HUNG
ceph: dicard cap releases on mds restart
ceph: make mon client statfs handling more generic
ceph: drop src address(es) from message header [new protocol feature]
...
23 May, 2010
4 commits
-
This patch removes a redundant fid clone on the directory fid and hence
reduces a server transaction while creating new filesystem object.Signed-off-by: Venkateswararao Jujjuri
Signed-off-by: Eric Van Hensbergen -
We never use "v9ses" and so we can remove it.
Signed-off-by: Dan Carpenter
Signed-off-by: Eric Van Hensbergen -
Without this patch, an attempt to mksock will get an EINVAL.
Before this patch:
[root@localhost 1dir]# mksock mysock
mksock: error making mysock: Invalid argumentWith this patch:
[root@localhost 1dir]# mksock mysock
[root@localhost 1dir]# ls -l mysock
s--------- 1 root root 0 2010-03-31 17:44 mysockSigned-off-by: Venkateswararao Jujjuri
Signed-off-by: Eric Van Hensbergen -
For lookup if we get ENOENT error from the server we still
instantiate the dentry. We need to make sure we have dentry
operations set in that case so that a later dput on the dentry
does the expected. Without the patch we get the below error#ln -sf abc abclink
ln: creating symbolic link `abclink': No such file or directoryNow on the host do
$ touch abclinkGuest now gives ENOENT error.
# ls
ls: cannot access abclink: No such file or directoryDebugged-by:Gautham R Shenoy
Signed-off-by: Aneesh Kumar K.V
Signed-off-by: Eric Van Hensbergen
22 May, 2010
28 commits
-
Pushdown the bkl to autofs4_root_ioctl.
Signed-off-by: Frederic Weisbecker
Cc: Ian Kent
Cc: Autofs
Cc: Thomas Gleixner
Cc: John Kacur
Cc: Arnd Bergmann -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (69 commits)
fix handling of offsets in cris eeprom.c, get rid of fake on-stack files
get rid of home-grown mutex in cris eeprom.c
switch ecryptfs_write() to struct inode *, kill on-stack fake files
switch ecryptfs_get_locked_page() to struct inode *
simplify access to ecryptfs inodes in ->readpage() and friends
AFS: Don't put struct file on the stack
Ban ecryptfs over ecryptfs
logfs: replace inode uid,gid,mode initialization with helper function
ufs: replace inode uid,gid,mode initialization with helper function
udf: replace inode uid,gid,mode init with helper
ubifs: replace inode uid,gid,mode initialization with helper function
sysv: replace inode uid,gid,mode initialization with helper function
reiserfs: replace inode uid,gid,mode initialization with helper function
ramfs: replace inode uid,gid,mode initialization with helper function
omfs: replace inode uid,gid,mode initialization with helper function
bfs: replace inode uid,gid,mode initialization with helper function
ocfs2: replace inode uid,gid,mode initialization with helper function
nilfs2: replace inode uid,gid,mode initialization with helper function
minix: replace inode uid,gid,mode init with helper
ext4: replace inode uid,gid,mode init with helper
...Trivial conflict in fs/fs-writeback.c (mark bitfields unsigned)
-
Use the same message, allocated during startup. No need to reallocate a
new one each time around (and potentially ENOMEM).Signed-off-by: Sage Weil
-
Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
we can get to them from page->mapping->host, no need to mess with
file.Signed-off-by: Al Viro
-
Don't put struct file on the stack as it takes up quite a lot of space
and violates lifetime rules for struct file.Rather than calling afs_readpage() indirectly from the directory routines by
way of read_mapping_page(), split afs_readpage() to have afs_page_filler()
that's given a key instead of a file and call read_cache_page(), specifying the
new function directly. Use it in afs_readpages() as well.Also make use of this in afs_mntpt_check_symlink() too for the same reason.
Reported-by: Al Viro
Signed-off-by: Al Viro
Signed-off-by: David Howells -
This is a seriously simplified patch from Eric Sandeen; copy of
rationale follows:
===
mounting stacked ecryptfs on ecryptfs has been shown to lead to bugs
in testing. For crypto info in xattr, there is no mechanism for handling
this at all, and for normal file headers, we run into other trouble:BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
IP: [] ecryptfs_d_revalidate+0x43/0xa0 [ecryptfs]
...There doesn't seem to be any good usecase for this, so I'd suggest just
disallowing the configuration.Based on a patch originally, I believe, from Mike Halcrow.
===Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
Signed-off-by: Dmitry Monakhov
Signed-off-by: Al Viro -
Acked-by: Jan Kara
Signed-off-by: Dmitry Monakhov
Signed-off-by: Al Viro -
Acked-by: Artem Bityutskiy
Signed-off-by: Dmitry Monakhov
Signed-off-by: Al Viro -
Signed-off-by: Dmitry Monakhov
Signed-off-by: Al Viro -
Signed-off-by: Dmitry Monakhov
Signed-off-by: Al Viro -
- seems what ramfs_get_inode is only locally, make it static.
[AV: the hell it is; it's used by shmem, so shmem needed conversion too
and no, that function can't be made static]Signed-off-by: Dmitry Monakhov
Signed-off-by: Al Viro -
Signed-off-by: Dmitry Monakhov
Signed-off-by: Al Viro -
Signed-off-by: Dmitry Monakhov
Signed-off-by: Al Viro -
Acked-by: Joel Becker
Signed-off-by: Dmitry Monakhov
Signed-off-by: Al Viro -
Acked-by: Ryusuke Konishi
Signed-off-by: Dmitry Monakhov
Signed-off-by: Al Viro -
- also redesign minix_new_inode interface
Signed-off-by: Dmitry Monakhov
Signed-off-by: Al Viro -
Signed-off-by: Dmitry Monakhov
Signed-off-by: Al Viro -
Acked-by: Jan Kara
Signed-off-by: Dmitry Monakhov
Signed-off-by: Al Viro -
Acked-by: Jan Kara
Signed-off-by: Dmitry Monakhov
Signed-off-by: Al Viro -
Ack-by: Boaz Harrosh
Signed-off-by: Dmitry Monakhov
Signed-off-by: Al Viro -
Signed-off-by: Dmitry Monakhov
Signed-off-by: Al Viro -
Acked-by: Dave Kleikamp
Signed-off-by: Dmitry Monakhov
Signed-off-by: Al Viro -
Signed-off-by: Dmitry Monakhov
Signed-off-by: Al Viro -
Signed-off-by: Dmitry Monakhov
Signed-off-by: Al Viro