- 26 Jun, 2009 1 commit
-
-
Johannes Weiner authored
!CONFIG_SWAP dummy. Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Rik van Riel <riel@redhat.com> Cc: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 23 Jun, 2009 2 commits
-
-
Andrew Morton authored
Cc: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Johannes Weiner authored
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Reviewed-by: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 19 Aug, 2009 1 commit
-
-
James Toy authored
The following commit make console open fails while booting: commit d966976924119acd35a431adbb95292082f73f8c Author: Alan Cox <alan@linux.intel.com> Date: Tue Aug 11 10:23:05 2009 +1000 tty: make the kref destructor occur asynchronously Due to tty release routines runs in workqueue now, error like following will be reported while booting: INIT open /dev/console Input/output error The reason is that now there's latency issue with closing, but when we open a "closing not finished" tty, -EIO will be returned. Fix it as alan's following suggestion: Fun but its actually not a bug and the fix is wrong in itself as the port may be closing but not yet being destructed, in which case it seems to do the wrong thing. Opening a tty that is closing (and could be closing for long periods) is supposed to return -EIO. I suspect a better way to deal with this and keep the old console timing is to split tty->shutdown into two functions. tty->shutdown() - called synchronously just before we dump the tty onto the waitqueue for destruction tty->cleanup() - called when the destructor runs. We would then do the shutdown part which can occur in IRQ context fine, before queueing the rest of the release (from tty->magic = 0 ... the end) to occur asynchronously The USB update in -next would then need a call like if (tty->cleanup) tty->cleanup(tty); at the top of the async function and the USB shutdown to be split between shutdown and cleanup as the USB resource cleanup and final tidy cannot occur synchronously as it needs to sleep. In other words the logic becomes final kref put make object unfindable async clean it up Signed-off-by: Dave Young <hidave.darkstar@gmail.com> Cc: Greg KH <greg@kroah.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Emmanuel Benisty <benisty.e@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 13 Jul, 2009 1 commit
-
-
Mike Frysinger authored
into the kernel, disable the option for this driver when it is going to be built as a module. Otherwise we get build failures due to the ifdef handling. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 20 Aug, 2009 2 commits
-
-
dimitri.gorokhovik@free.fr authored
X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on y.localdomain X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=ham version=3.2.4 Received: from y.localdomain (y.localdomain [127.0.0.1]) by y.localdomain (8.14.2/8.14.2) with ESMTP id n7KLGOeb024890 for <akpm@localhost>; Thu, 20 Aug 2009 14:16:25 -0700 Received: from imap1.linux-foundation.org [140.211.169.55] by y.localdomain with POP3 (fetchmail-6.3.8) for <akpm@localhost> (single-drop); Thu, 20 Aug 2009 14:16:25 -0700 (PDT) Received: from smtp1.linux-foundation.org (smtp1.linux-foundation.org [140.211.169.13]) by imap1.linux-foundation.org (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with ESMTP id n7KLENDv026441 for <akpm@imap1.linux-foundation.org>; Thu, 20 Aug 2009 14:14:23 -0700 Received: from wmproxy1-g27.free.fr (wmproxy1-g27.free.fr [212.27.42.91]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id n7KLDkPS021661 for <akpm@linux-foundation.org>; Thu, 20 Aug 2009 14:13:48 -0700 Received: from wmproxy1-g27.free.fr (localhost [127.0.0.1]) by wmproxy1-g27.free.fr (Postfix) with ESMTP id ADA7B2E7C; Thu, 20 Aug 2009 23:13:45 +0200 (CEST) Received: from zimbra3-e1.priv.proxad.net (zimbra3-e1.priv.proxad.net [172.20.243.153]) by wmproxy1-g27.free.fr (Postfix) with ESMTP id 986B52BCE; Thu, 20 Aug 2009 23:13:45 +0200 (CEST) Date: Thu, 20 Aug 2009 23:13:46 +0200 (CEST) To: Andrew Morton <akpm@linux-foundation.org> Cc: David Woodhouse <dwmw2@infradead.org>, David Woodhouse <David.Woodhouse@intel.com>, Tim Gardner <tim.gardner@canonical.com>, Scott James Remnant <scott@canonical.com>, Julia Lawall <julia@diku.dk>, David Brownell <dbrownell@users.sourceforge.net>, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Message-ID: <420676341.3665461250802826403.JavaMail.root@zimbra3-e1.priv.proxad.net> In-Reply-To: <20090819163426.fa90cf9f.akpm@linux-foundation.org> Subject: Re: [PATCH] nftl: fix offset alignments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Originating-IP: [79.85.212.132] X-Mailer: Zimbra 5.0 (ZimbraWebClient - [unknown] (Linux)/5.0.15_GA_2815.UBUNTU8_64) X-Authenticated-User: dimitri.gorokhovik@free.fr X-Virus-Scanned: ClamAV using ClamSMTP Received-SPF: none (domain of dimitri.gorokhovik@free.fr does not designate permitted sender hosts) X-MIMEDefang-Filter: lf$Revision: 1.188 $ X-Scanned-By: MIMEDefang 2.63 on 140.211.169.13 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by imap1.linux-foundation.org id n7KLENDv026441 "Andrew Morton" <akpm@linux-foundation.org> a écrit : > On Wed, 19 Aug 2009 00:06:28 +0200 (CEST) dimitri.gorokhovik@free.fr > wrote: > ... > > + typeof(offs) mask = mtd->writesize - 1; > > I see no reason to use typeof here. Plain old > > loff_t mask = mtd->writesize - 1; > > would be more conventional. I use typeoff in this way to guard masking code against absent-minded modifications. Attached is a corrected version as suggested. Maybe Julia can come up with a clever rule for detecting unusual masking operations automatically :-) ?
-
Dimitri Gorokhovik authored
Signed-off-by: Dimitri Gorokhovik <dimitri.gorokhovik@free.fr> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Tim Gardner <tim.gardner@canonical.com> Cc: Scott James Remnant <scott@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 30 Jul, 2009 1 commit
-
-
Anton Vorontsov authored
m25p80 spi32766.0: m25p80 (1024 Kbytes) Unable to handle kernel paging request for data at address 0x00000008 Faulting instruction address: 0xc03a54b0 Oops: Kernel access of bad area, sig: 11 [#1] Modules linked in: NIP: c03a54b0 LR: c03a5494 CTR: c01e98b8 REGS: ef82bb60 TRAP: 0300 Not tainted (2.6.31-rc4-00167-g4733fd32) MSR: 00029000 <EE,ME,CE> CR: 24022022 XER: 20000000 DEAR: 00000008, ESR: 00000000 TASK = ef82c000[1] 'swapper' THREAD: ef82a000 GPR00: 00000000 ef82bc10 ef82c000 0000002e 00001eb8 ffffffff c01e9824 00000036 GPR08: c054ed40 c0542a08 00001eb8 00004000 22022022 1001a1a0 3ff8fd00 00000000 GPR16: 00000000 00000001 00000000 00000000 ef82bddc c0530000 efbef500 ef8356d0 GPR24: 00000000 ef8356d0 00000000 efbf7a00 c0530ec4 ffffffed efbf5300 c0541f98 NIP [c03a54b0] m25p_probe+0x22c/0x354 LR [c03a5494] m25p_probe+0x210/0x354 Call Trace: [ef82bc10] [c03a5494] m25p_probe+0x210/0x354 (unreliable) [ef82bca0] [c024e37c] spi_drv_probe+0x2c/0x3c [ef82bcb0] [c01f1afc] driver_probe_device+0xa4/0x178 [ef82bcd0] [c01f06e8] bus_for_each_drv+0x6c/0xa8 [ef82bd00] [c01f1a34] device_attach+0x84/0xa8 ... Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 29 Jul, 2009 2 commits
-
-
Thadeu Lima de Souza Cascardo authored
inverted until we change the GPIO state. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Cc: Samuel R. C. Vale <srcvale@holoscopio.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Thadeu Lima de Souza Cascardo authored
done without freing the previous request. It will also try to free a failed request or an already freed IRQ if 0 was written to the gpio file. All these oops and leaks were fixed with the following solution: keep the previous allocated GPIO (if any) still allocated in case the new request fails. The alternative solution would desallocate the previous allocated GPIO and set gpio as 0. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: Samuel R. C. Vale <srcvale@holoscopio.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 20 Aug, 2009 2 commits
-
-
Hannes Reinecke authored
is missing from the System.map file. The culprit is commit 091e52c3, which moved the '_end' symbol into it's own section. Apparently this causes kallsyms to not reference it properly. So either we'd need to revert part of the patch to not include _end in it's own section. Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Troy Heber authored
fault_index is a 0-based index into the ring. The code allows the 0-based fault_index to be equal to the total number of fault registers available from the cap_num_fault_regs() macro, which causes access beyond the last available register. Signed-off-by Troy Heber <troy.heber@hp.com> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 06 Aug, 2009 1 commit
-
-
Yinghai Lu authored
> [ 1.507461] pci 0000:00:09.0: Firmware left e100 interrupts enabled; > disabling > [ 1.532778] early_ioremap(3fffd080, 0000005c) [0] => Pid: 1, comm: > swapper Not tainted 2.6.31-rc4 #36 > [ 1.561007] Call Trace: > [ 1.568638] [<c136e48b>] ? printk+0x18/0x1d > [ 1.581734] [<c15513ff>] __early_ioremap+0x74/0x1e9 > [ 1.596898] [<c15515aa>] early_ioremap+0x1a/0x1c > [ 1.611270] [<c154a187>] __acpi_map_table+0x18/0x1a > [ 1.626451] [<c135a7f8>] acpi_os_map_memory+0x1d/0x25 > [ 1.642129] [<c119459c>] acpi_tb_verify_table+0x20/0x49 > [ 1.658321] [<c1193e50>] acpi_get_table_with_size+0x53/0xa1 > [ 1.675553] [<c1193eae>] acpi_get_table+0x10/0x15 > [ 1.690192] [<c155cc19>] acpi_processor_init+0x23/0xab > [ 1.706126] [<c1001043>] do_one_initcall+0x33/0x180 > [ 1.721279] [<c155cbf6>] ? acpi_processor_init+0x0/0xab > [ 1.737479] [<c106893a>] ? register_irq_proc+0xaa/0xc0 > [ 1.753411] [<c10689b7>] ? init_irq_proc+0x67/0x80 > [ 1.768316] [<c15405e7>] kernel_init+0x120/0x176 > [ 1.782678] [<c15404c7>] ? kernel_init+0x0/0x176 > [ 1.797062] [<c10038b7>] kernel_thread_helper+0x7/0x10 > [ 1.812984] 00000080 + ffe00000 that is rather later. acpi_gbl_permanent_mmap should be set in acpi_early_init() if acpi is not disabled and we have > [ 0.000000] ASUS P2B-DS detected: force use of acpi=ht just don't load acpi_processor_init... Reported-and-tested-by: Jens Rosenboom <jens@leia.mcbone.net> Signed-off-by: Yinghai Lu <yinghai@kernel.org> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 04 Aug, 2009 1 commit
-
-
Michael Brunner authored
thermal zone update. This may lead to a critical shutdown if get_temp fails and the content of the temp variable is incorrectly set higher than the critical trip point. This has been observed on a system with incorrect ACPI implementation where the corresponding methods were not serialized and therefore sometimes triggered ACPI errors (AE_ALREADY_EXISTS). The following critical shutdowns indicated a temperature of 2097 C, which was obviously wrong. The patch adds a return value check that jumps over all trip point evaluations printing a warning if get_temp fails. The trip points are evaluated again on the next polling interval with successful get_temp execution. Signed-off-by: Michael Brunner <mibru@gmx.de> Acked-by: Zhang Rui <rui.zhang@intel.com> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 02 Jul, 2009 1 commit
-
-
Andrew Morton authored
Cc: Richard Kennedy <richard@rsk.demon.co.uk> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 20 Aug, 2009 5 commits
-
-
Minchan Kim authored
clear PG_mlocked while it remains in a VM_LOCKED vma. This means it can be put onto the [in]active list. We can rescue it by using try_to_unmap() in shrink_page_list(). But now, As Wu Fengguang pointed out, vmscan has a bug. If the page has PG_referenced, it can't reach try_to_unmap() in shrink_page_list() but is put into the active list. If the page is referenced repeatedly, it can remain on the [in]active list without being moving to the unevictable list. This patch fixes it. Reported-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Minchan Kim <minchan.kim@gmail.com> Cc: KOSAKI Motohiro <<kosaki.motohiro@jp.fujitsu.com> Cc: Lee Schermerhorn <lee.schermerhorn@hp.com> Acked-by: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
David Rientjes authored
type so that sizeof() cannot be used and C99 does not require the zero-length specification. Signed-off-by: David Rientjes <rientjes@google.com> Acked-by: Dave Hansen <dave@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
David Rientjes authored
remove their respective comments. Signed-off-by: David Rientjes <rientjes@google.com> Acked-by: Dave Hansen <dave@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
David Rientjes authored
flex_array_put() starting at a non-zero index, flex_array_get() will fail to return the data. This fixes the bug by only checking for NULL parts when all elements do not fit in the base structure when flex_array_get() is used. Otherwise, fa_element_to_part_nr() will always be 0 since there are no parts structures needed and such element may never have been put. Thus, it will remain NULL due to the kzalloc() of the base. Additionally, flex_array_put() now only checks for a NULL part when all elements do not fit in the base structure. This is otherwise unnecessary since the base structure is guaranteed to exist (or we would have already hit a NULL pointer). Signed-off-by: David Rientjes <rientjes@google.com> Acked-by: Dave Hansen <dave@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Joonwoo Park authored
otherwise driver triggers kernel oops. Signed-off-by: Joonwoo Park<joonwpark81@gmail.com> Cc: Rodolfo Giometti <giometti@enneenne.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 14 Aug, 2009 1 commit
-
-
James Toy authored
- add -mmN to EXTRAVERSION - Add a marker to make the v4l build environment happier Signed-off-by: Michael Krufky <mkrufky@m1k.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 13 Aug, 2009 1 commit
-
-
Christoph Hellwig authored
Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Chris Zankel <chris@zankel.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 24 Jul, 2009 1 commit
-
-
Amerigo Wang authored
xtensa_pipe() for xtensa. Signed-off-by: WANG Cong <amwang@redhat.com> Reviewed-by: Johannes Weiner <jw@emlix.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Chris Zankel <chris@zankel.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 18 Aug, 2009 1 commit
-
-
Chris Friesen authored
However, the book E wdt currently treats it as a "period" which is interpreted in a board-specific way. This patch allows the user to pass in a "seconds" value and the driver will set the smallest timeout that is at least as large as specified by the user. It's been tested on e500 hardware and works as expected. The patch only modifies the CONFIG_FSL_BOOKE case, the CONFIG_4xx case is left unmodified as I don't have any hardware to test it on. Signed-off-by: Chris Friesen <cfriesen@nortel.com> Cc: Kumar Gala <galak@gate.crashing.org> Cc: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 20 Aug, 2009 13 commits
-
-
Nick Piggin authored
Cc: Christoph Hellwig <hch@lst.de> Cc: Jan Kara <jack@suse.cz> Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Cc: Chris Mason <chris.mason@oracle.com> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk> Cc: Miklos Szeredi <miklos@szeredi.hu> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Steven French <sfrench@us.ibm.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Nick Piggin authored
Cc: Jan Kara <jack@suse.cz> Cc: Christoph Hellwig <hch@lst.de> Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Cc: Chris Mason <chris.mason@oracle.com> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk> Cc: Miklos Szeredi <miklos@szeredi.hu> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Steven French <sfrench@us.ibm.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Nick Piggin authored
product of my mkfs.jfs for some reason. Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Jan Kara <jack@suse.cz> Cc: Chris Mason <chris.mason@oracle.com> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk> Cc: Miklos Szeredi <miklos@szeredi.hu> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Steven French <sfrench@us.ibm.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Nick Piggin authored
Cc: Chris Mason <chris.mason@oracle.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Jan Kara <jack@suse.cz> Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk> Cc: Miklos Szeredi <miklos@szeredi.hu> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Steven French <sfrench@us.ibm.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Nick Piggin authored
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Cc: Christoph Hellwig <hch@lst.de> Cc: Jan Kara <jack@suse.cz> Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Cc: Chris Mason <chris.mason@oracle.com> Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk> Cc: Miklos Szeredi <miklos@szeredi.hu> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Steven French <sfrench@us.ibm.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Nick Piggin authored
XXX. Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: <linux-ext4@vger.kernel.org> Cc: Christoph Hellwig <hch@lst.de> Cc: Jan Kara <jack@suse.cz> Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Cc: Chris Mason <chris.mason@oracle.com> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk> Cc: Miklos Szeredi <miklos@szeredi.hu> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Steven French <sfrench@us.ibm.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Nick Piggin authored
Cc: Christoph Hellwig <hch@lst.de> Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Cc: Jan Kara <jack@suse.cz> Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Cc: Chris Mason <chris.mason@oracle.com> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Cc: Miklos Szeredi <miklos@szeredi.hu> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Steven French <sfrench@us.ibm.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Nick Piggin authored
sequence. Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: Christoph Hellwig <hch@lst.de> Cc: Jan Kara <jack@suse.cz> Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Cc: Chris Mason <chris.mason@oracle.com> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk> Cc: Miklos Szeredi <miklos@szeredi.hu> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Steven French <sfrench@us.ibm.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Nick Piggin authored
than setattr > vmtruncate > truncate, have filesystems call their truncate sequence from ->setattr if filesystem specific operations are required. vmtruncate is deprecated, and truncate_pagecache and inode_newsize_ok helpers introduced previously should be used. simple_setattr is introduced for simple in-ram filesystems to implement the new truncate sequence. Eventually all filesystems should be converted to implement a setattr, and the default code in notify_change should go away. simple_setsize is also introduced to perform just the ATTR_SIZE portion of simple_setattr (ie. changing i_size and trimming pagecache). A new attribute is introduced into inode_operations structure; .new_truncate is a temporary hack to distinguish filesystems that implement the new truncate system. To implement the new truncate sequence: - set .new_truncate = 1 - filesystem specific manipulations (eg freeing blocks) must be done in the setattr method rather than ->truncate. - vmtruncate can not be used by core code to trim blocks past i_size in the event of write failure after allocation, so this must be performed in the fs code. - make use of the better opportunity to catch errors with the above 2 changes. - inode_setattr should not be used. generic_setattr is a new function to be used to copy simple attributes into the generic inode. Big problem with the previous calling sequence: the filesystem is not called until i_size has already changed. This means it is not allowed to fail the call, and also it does not know what the previous i_size was. Also, generic code calling vmtruncate to truncate allocated blocks in case of error had no good way to return a meaningful error (or, for example, atomically handle block deallocation). Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: Christoph Hellwig <hch@lst.de> Cc: Jan Kara <jack@suse.cz> Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Cc: Chris Mason <chris.mason@oracle.com> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk> Cc: Miklos Szeredi <miklos@szeredi.hu> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Steven French <sfrench@us.ibm.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Nick Piggin authored
previous patch. Should be no significant change in behaviour (except CIFS now calls send_sig under i_lock, via inode_newsize_ok). Signed-off-by: Nick Piggin <npiggin@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Miklos Szeredi <miklos@szeredi.hu> Cc: <linux-nfs@vger.kernel.org> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: <linux-cifs-client@lists.samba.org> Cc: Steven French <sfrench@us.ibm.com> Cc: Jan Kara <jack@suse.cz> Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Cc: Chris Mason <chris.mason@oracle.com> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk> Cc: Steven French <sfrench@us.ibm.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Nick Piggin authored
vmtruncate is also consolidated from mm/memory.c and mm/nommu.c and into mm/truncate.c. Signed-off-by: Nick Piggin <npiggin@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Cc: Jan Kara <jack@suse.cz> Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Cc: Chris Mason <chris.mason@oracle.com> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk> Cc: Miklos Szeredi <miklos@szeredi.hu> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Steven French <sfrench@us.ibm.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Amerigo Wang authored
into this file should be allowed and suid should be removed after that. However, current kernel only allows writing without truncations, when we do truncations on that file, we get EPERM. This is a bug. Steps to reproduce this bug: % ls -l rootdir/file1 -rwsrwsrwx 1 root root 3 Jun 25 15:42 rootdir/file1 % echo h > rootdir/file1 zsh: operation not permitted: rootdir/file1 % ls -l rootdir/file1 -rwsrwsrwx 1 root root 3 Jun 25 15:42 rootdir/file1 % echo h >> rootdir/file1 % ls -l rootdir/file1 -rwxrwxrwx 1 root root 5 Jun 25 16:34 rootdir/file1 Signed-off-by: WANG Cong <amwang@redhat.com> Cc: Eric Sandeen <esandeen@redhat.com> Cc: Eric Paris <eparis@redhat.com> Cc: Eugene Teo <eteo@redhat.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Cc: Christoph Hellwig <hch@lst.de> Cc: Stephen Smalley <sds@tycho.nsa.gov> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Amerigo Wang authored
http://lkml.org/lkml/2009/8/7/132, we should let selinux_inode_setattr() to match our ATTR_* rules. ATTR_FORCE should not force things like ATTR_SIZE. [hirofumi@mail.parknet.co.jp: tweaks] Signed-off-by: WANG Cong <amwang@redhat.com> Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Acked-by: Stephen Smalley <sds@tycho.nsa.gov> Cc: Eric Paris <eparis@redhat.com> Cc: Eugene Teo <eteo@redhat.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 18 Aug, 2009 1 commit
-
-
Miklos Szeredi authored
bind mount of a non-filesystem-root directory is detached: > mkdir /mnt/foo > mount --bind /etc /mnt/foo > cd /mnt/foo/skel > umount -l /mnt/foo > /bin/pwd etcskel If it was the root of the filesystem which was detached, it will give a saner looking result, but it still won't be a valid absolute path by which the CWD can be reached (assuming the process's root is not also on the detached mount). A similar issue happens if the CWD is outside the process's root or in a different namespace. These problems are relevant to symlinks under /proc/<pid>/ and /proc/<pid>/fd/ as well. This patch addresses all these issues, by prefixing such unreachable paths with "(unreachable)". This isn't perfect since the returned path may still be a valid _relative_ path, and applications may not check the result of getcwd() for starting with a '/' before using it. For this reason Andreas Gruenbacher thinks getcwd(2) should return ENOENT in these cases, but that breaks /bin/pwd and bash in the above cases. Reported-by: John Johansen <jjohansen@suse.de> Cc: Matthew Wilcox <matthew@wil.cx> Cc: Andreas Gruenbacher <agruen@suse.de> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 19 Aug, 2009 1 commit
-
-
Jeff Layton authored
is redundant and is already checked in rw_verify_area. Signed-off-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Christoph Hellwig <hch@lst.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Robert Love <rlove@google.com> Cc: Mandeep Singh Baines <msb@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 12 Aug, 2009 1 commit
-
-
Jeff Layton authored
exist on the filesystem. It's declared as an unsigned long long. Even if a filesystem has no inherent limit that prevents it from using every bit in that unsigned long long, it's still problematic to set it to anything larger than MAX_LFS_FILESIZE. There are places in the kernel that cast s_maxbytes to a signed value. If it's set too large then this cast makes it a negative number and generally breaks the comparison. Change s_maxbytes to be loff_t instead. That should help eliminate the temptation to set it too large by making it a signed value. Also, add a warning for couple of releases to help catch filesystems that set s_maxbytes too large. Eventually we can either convert this to a BUG() or just remove it and in the hope that no one will get it wrong now that it's a signed value. Signed-off-by: Jeff Layton <jlayton@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Christoph Hellwig <hch@lst.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Robert Love <rlove@google.com> Cc: Mandeep Singh Baines <msb@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-