dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

119823 Commits

Author SHA1 Message Date
David Woodhouse 3854be7712 [MTD] Remove strange u_int32_t types from FTL
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 14:06:42 +00:00
David Woodhouse 0f07a0be39 [MTD] [NAND] Remove strange u_int64_t types from nandsim
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 14:01:46 +00:00
Adrian Hunter 69423d99fc [MTD] update internal API to support 64-bit device size
MTD internal API presently uses 32-bit values to represent
device size.  This patch updates them to 64-bits but leaves
the external API unchanged.  Extending the external API
is a separate issue for several reasons.  First, no one
needs it at the moment.  Secondly, whether the implementation
is done with IOCTLs, sysfs or both is still debated.  Thirdly
external API changes require the internal API to be accepted
first.

Note that although the MTD API will be able to support 64-bit
device sizes, existing drivers do not and are not required
to do so, although NAND base has been updated.

In general, changing from 32-bit to 64-bit values cause little
or no changes to the majority of the code with the following
exceptions:
    	- printk message formats
    	- division and modulus of 64-bit values
    	- NAND base support
	- 32-bit local variables used by mtdpart and mtdconcat
	- naughtily assuming one structure maps to another
	in MEMERASE ioctl

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 13:37:21 +00:00
Alexey Korolev 8a4c2495b1 MTD: nandsim: use less RAM
Nandsim consumes ~2x more RAM than the density of simulated device.
It becomes critical if we need to simulate 256MB NAND and run stress tests
on it.

We investigated the reasons. nandsim allocates space for pages using kmalloc
function. The size of LP nand page is 2112 bytes.
kmalloc gets space from slab pools by chunks 2^n. So if we need to kmalloc
2112 bytes, 4096 bytes will be consumed by system.
The best way to avoid this issue would be using kmem_cache allocations. AFAIK
this mechanism specially designed to handle cases when arrays of allocations
are used.

Signed-off-by: Alexey Korolev <akorolev@infradead.org>
Tested-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 13:35:23 +00:00
Adrian Hunter a9fc899188 MTD: nandsim: add option to use a file to cache pages
Add a new module parameter 'cache_file' which causes nandsim
to use that file instead of memory to cache nand data.
Using a file allows the simulation of NAND that is bigger
than the available memory.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 13:35:21 +00:00
Adrian Hunter 9359ea461b MTD: nandsim: suppress unnecessary warning
nand_base sometimes reads only 2 bytes of a 4 byte id.
It is OK.  Do not print a warning in that case.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 13:35:19 +00:00
Dmitri Vorobiev 4f8f3af20a [MTD] Make init_impa7 static
The function init_impa7 does not need to be global, and
this patch makes it static by adding the needed keyword
to drivers/mtd/maps/impa7.c.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 13:01:32 +00:00
Dmitri Vorobiev 9a2b3974ef [MTD] Make init_redwood_flash function static
The function init_redwood_flash is needlessly defined global,
make it static by this patch.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 13:01:29 +00:00
Dmitri Vorobiev 6127cfcd3d [MTD] Make init_msp_flash function static
The function init_msp_flash, which is not used outside of
drivers/mtd/maps/pmcmsp-flash.c, can become static. This
patch adds the needed keyword.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 13:01:26 +00:00
Dmitri Vorobiev 2257594f9c [MTD] Make h720x_mtd_init function static
The function h720x_mtd_init is not used outside of the file
drivers/mtd/maps/h720x-flash.c and can therefore become static.
This patch adds the necessary keyword.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 13:01:23 +00:00
Dmitri Vorobiev 9cdd52fa97 [MTD] Make init_mbx function static
The function init_mbx can become static, because it is not used
outside the file drivers/mtd/maps/mbx860.c. This patch adds the
needed keyword.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 13:01:20 +00:00
Dmitri Vorobiev 1aed165a60 [MTD] Make the function init_vmax301 static
The function init_vmax301 is needlessly defined global in
drivers/mtd/maps/vmax301.c, and this patch makes it static.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 13:01:17 +00:00
Dmitri Vorobiev e63b3f94b0 [MTD] Make init_fortunet function static
The symbol init_fortunet is needlessly defined global in
drivers/mtd/maps/fortunet.c. Make it static and clean up
the kernel global namespace.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 13:01:13 +00:00
Dmitri Vorobiev b93dc2e9fc [MTD] Make alchemy_mtd_init function static
The symbol alchemy_mtd_init does not need to be global, so make it
static in drivers/mtd/maps/alchemy-flash.c.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 13:01:10 +00:00
Dmitri Vorobiev 9bd1c9dac8 [MTD] Make ipaq_mtd_init function static
The symbol ipaq_mtd_init is not used anywhere outside of
drivers/mtd/maps/ipaq-flash.c, so make it static.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 13:01:06 +00:00
Dmitri Vorobiev baa0f0fc5f [MTD] Make init_dbox2_flash static
The symbol init_dbox2_flash is not used outside of the file
drivers/mtd/maps/dbox2-flash.c, so make it static.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 13:01:02 +00:00
Dmitri Vorobiev 2e257a2d6d [MTD] Make init_flagadm function static
The module init function init_flagadm does not need to be global,
so add the needed keyword to drivers/mtd/maps/cfi_flagadm.c.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 13:01:00 +00:00
Dmitri Vorobiev d849257c42 [MTD] Make init_oct5066 function static
The function init_oct5066 is needlessly defined global in
drivers/mtd/maps/octagon-5066.c. Make it static.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 13:00:56 +00:00
Dmitri Vorobiev d8156adb7a [MTD] Make the init_edb7312nor function static
The init_edb7312nor function is needlessly defined global in
drivers/mtd/maps/edb7312.c, and this patch makes it static.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 13:00:51 +00:00
Dmitri Vorobiev 8d240325b3 [MTD] Make init_sbc82xx_flash function static
The function init_sbc82xx_flash is needlessly defined global in
drivers/mtd/maps/wr_sbc82xx_flash.c, and this patch makes it static.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 13:00:47 +00:00
Dmitri Vorobiev bc185405c8 [MTD] Make init_rpxlite function static
The function init_rpxlite, which is not used outside of
drivers/mtd/maps/rpxlite.c, can become static. Add the
needed keyword.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 13:00:43 +00:00
Dmitri Vorobiev e30bb9cf5f [MTD] Make init_tqm_mtd function static
The init_tqm_mtd function does not need to be defined globally
in drivers/mtd/maps/tqm8xxl.c. Make it static.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 13:00:37 +00:00
Dmitri Vorobiev 769455e224 [MTD] Make uclinux_mtd_cleanup and uclinux_mtd_init static
The functions uclinux_mtd_cleanup and uclinux_mtd_init do
not heed to be global. Add the needed keyword to the file
drivers/mtd/maps/uclinux.c to make these functions static.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 13:00:33 +00:00
Dmitri Vorobiev e4582ea71c [MTD] Make lart_flash_init, lart_flash_exit static
The symbols lart_flash_init, lart_flash_exit are needlessly
defined global in drivers/mtd/devices/lart.c, so make them
static.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 13:00:26 +00:00
Dmitri Vorobiev 9ee49fa5c1 [MTD] Make init_sbc8240_mtd function static
The function init_sbc8240_mtd is not called from outside the
module drivers/mtd/maps/sbc8240.c where it is defined, so it
can become static. Add the needed keyword.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 13:00:23 +00:00
Dmitri Vorobiev 26eb108570 [MTD] Make init_sharpsl symbol static
The function init_sharpsl is needlessly defined global.
Make it static by adding the needed keyword to the file
drivers/mtd/maps/sharpsl-flash.c, where the function is
defined.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10 13:00:11 +00:00
Linus Torvalds 4d9c6a21be Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6:
  [MTD] [NAND] fix OOPS accessing flash operations over STM flash on PXA
  [MTD] [NAND] drivers/mtd/nand/pasemi_nand.c: Add missing pci_dev_put
  [MTD] [NAND] fsl_upm: fix build problem with 2.6.28-rc2
  [MTD] physmap: fix memory leak on physmap_flash_remove by using devres
  [MTD] m25p80: chip erase != block erase != sector erase
  [MTD] m25p80: fix detection of m25p16 flashes
  [MTD] m25p80: fix detection of SPI parts
  [MTD] [NAND] OMAP: OneNAND: header file relocation (part 2)
  [MTD] [NAND] OMAP: OneNAND: header file relocation
2008-12-09 08:28:36 -08:00
Linus Torvalds b749e3f8d7 Merge branch 'audit.b59' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current
* 'audit.b59' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
  [PATCH] fix broken timestamps in AVC generated by kernel threads
  [patch 1/1] audit: remove excess kernel-doc
  [PATCH] asm/generic: fix bug - kernel fails to build when enable some common audit code on Blackfin
  [PATCH] return records for fork() both to child and parent
  [PATCH] Audit: make audit=0 actually turn off audit
2008-12-09 08:28:13 -08:00
Linus Torvalds 6f8e5850df Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  ata: Fix experimental tags
  pata_ninja32: update ID table
  pata_sis: Remove bogus cable match
  ATA: piix, fix pointer deref on suspend
  pata_hpt366: fix clock detection
2008-12-09 08:27:57 -08:00
Linus Torvalds 21283f056f Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/i915: Disable the GM965 MSI errata workaround.
  drm/i915: Don't return error in evict_everything when we get to the end.
  drm/radeon: don't actually enable the IRQ regs until irq is enabled
2008-12-09 08:27:39 -08:00
Linus Torvalds cdf0c7de29 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  powerpc/virtex5: Fix Virtex5 machine check handling
2008-12-09 08:26:43 -08:00
Benjamin Herrenschmidt f3179748a1 radeonfb: Disable new color expand acceleration unless explicitely enabled
This new color expansion acceleration for radeonfb appears to trigger
problems with X on VT switch and suspend/resume on some machines. It
might be a problem in the VT layer or in X, but I haven't quite found
it yet, so in the meantime, this disables the acceleration by default,
reverting to 2.6.27 state. It can be enabled using the "accel_cexp"
module parameter or fbdev argument.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-12-09 08:24:38 -08:00
Al Viro 48887e63d6 [PATCH] fix broken timestamps in AVC generated by kernel threads
Timestamp in audit_context is valid only if ->in_syscall is set.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-12-09 02:27:41 -05:00
Randy Dunlap 7f0ed77d24 [patch 1/1] audit: remove excess kernel-doc
Delete excess kernel-doc notation in kernel/auditsc.c:

Warning(linux-2.6.27-git10//kernel/auditsc.c:1481): Excess function parameter or struct member 'tsk' description in 'audit_syscall_entry'
Warning(linux-2.6.27-git10//kernel/auditsc.c:1564): Excess function parameter or struct member 'tsk' description in 'audit_syscall_exit'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Eric Paris <eparis@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-12-09 02:27:40 -05:00
Mike Frysinger 0b0c940a91 [PATCH] asm/generic: fix bug - kernel fails to build when enable some common audit code on Blackfin
If you enable some common audit code, the kernel fails to build.

In file included from lib/audit.c:17:
include/asm-generic/audit_write.h:3: error: '__NR_swapon' undeclared here (not in a function)
make[1]: *** [lib/audit.o] Error 1
make: *** [lib] Error 2

So do not use __NR_swapon if it isnt defined for a port.

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-12-09 02:27:39 -05:00
Al Viro a64e64944f [PATCH] return records for fork() both to child and parent
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-12-09 02:27:38 -05:00
Eric Paris a3f07114e3 [PATCH] Audit: make audit=0 actually turn off audit
Currently audit=0 on the kernel command line does absolutely nothing.
Audit always loads and always uses its resources such as creating the
kernel netlink socket.  This patch causes audit=0 to actually disable
audit.  Audit will use no resources and starting the userspace auditd
daemon will not cause the kernel audit system to activate.

Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-12-09 02:27:37 -05:00
Alan Cox e3389cbc65 ata: Fix experimental tags
Various tags are now way out of date

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-12-09 00:44:29 -05:00
Alan Cox b604958a98 pata_ninja32: update ID table
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-12-09 00:44:19 -05:00
Alan Cox e33ba2c6c6 pata_sis: Remove bogus cable match
Some systems report SIS 5513 as both vendor/id and subvendor/id
string. In that case we can't distinguish the system by the id
svid/sdid and in fact the entry here breaks some boxes. At some
point we need to find another way to detect the Targa Visionary 1000,
until then this trades a hang for some users with lower performance
for others.

Closes: #12092

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-12-09 00:44:11 -05:00
Jiri Slaby 9ac6212660 ATA: piix, fix pointer deref on suspend
Hi,

I've found this issue in the mmotm 2008-12-02-17-08.

--

Commit
ata_piix: add borked Tecra M4 to broken suspend list
introduced DMI variables checking, but they can be null, so that
we possibly dereference null.

Check if they are null and avoid checks in that case.

Solves:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
IP: [<ffffffff8043da97>] piix_pci_device_suspend+0x117/0x230

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Jeff Garzik <jgarzik@redhat.com>
Cc: Alexandru Romanescu <a_romanescu@yahoo.co.uk>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-12-09 00:43:54 -05:00
Tejun Heo 2456eb819b pata_hpt366: fix clock detection
pata_hpt366 had its clock detection wrong and detected 25Mhz as 40Mhz
and vice-versa.  Fix it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-12-09 00:43:40 -05:00
Keith Packard b60678a75d drm/i915: Disable the GM965 MSI errata workaround.
Since applying the fix suggested by the errata (disabling MSI), we've had
issues with interrupts being stuck on despite IIR being 0 on GM965 hardware.
Most reporters of the issue have confirmed that turning MSI back on fixes
things, and given the difficulties experienced in getting reliable MSI working
on Linux, it's believable that the errata was about software issues and not
actual hardware issues.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-12-09 15:37:24 +10:00
Owain Ainsworth 15c35334c9 drm/i915: Don't return error in evict_everything when we get to the end.
Returning -ENOMEM errored all the way out of execbuf, so the rendering never
occurred.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-12-09 15:37:17 +10:00
Dave Airlie fae7043c65 drm/radeon: don't actually enable the IRQ regs until irq is enabled
vblank can try and enable the IRQ registers before we've set the interrupt
handler up.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-12-09 15:30:50 +10:00
Paul Mackerras ab44f4627e Merge branch 'merge' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into merge 2008-12-09 14:58:37 +11:00
Linus Torvalds f7a8db89c1 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  tproxy: fixe a possible read from an invalid location in the socket match
  zd1211rw: use unaligned safe memcmp() in-place of compare_ether_addr()
  mac80211: use unaligned safe memcmp() in-place of compare_ether_addr()
  ipw2200: fix netif_*_queue() removal regression
  iwlwifi: clean key table in iwl_clear_stations_table function
  tcp: tcp_vegas ssthresh bug fix
  can: omit received RTR frames for single ID filter lists
  ATM: CVE-2008-5079: duplicate listen() on socket corrupts the vcc table
  netx-eth: initialize per device spinlock
  tcp: make urg+gso work for real this time
  enc28j60: Fix sporadic packet loss (corrected again)
  hysdn: fix writing outside the field on 64 bits
  b1isa: fix b1isa_exit() to really remove registered capi controllers
  can: Fix CAN_(EFF|RTR)_FLAG handling in can_filter
  Phonet: do not dump addresses from other namespaces
  netlabel: Fix a potential NULL pointer dereference
  bnx2: Add workaround to handle missed MSI.
  xfrm: Fix kernel panic when flush and dump SPD entries
2008-12-08 19:52:43 -08:00
Linus Torvalds 6f84b4dbe9 Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: fix default_spin_lock_flags() prototype
  AMD IOMMU: __unmap_single: check for bad_dma_address instead of 0
  AMD IOMMU: fix WARN_ON in dma_ops unmap path
  AMD IOMMU: fix typo in comment
  AMD IOMMU: fix loop counter in free_pagetable function
  AMD IOMMU: fix iommu_map_page function
2008-12-08 19:50:26 -08:00
Linus Torvalds 7f336bf1e5 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide: build-fix for CONFIG_BLK_DEV_IDEDMA_PMAC=n
  Revert "ide: respect current DMA setting during resume"
2008-12-08 19:50:09 -08:00
J. Bruce Fields a4f4d6df53 EXPORTFS: handle NULL returns from fh_to_dentry()/fh_to_parent()
While 440037287c "[PATCH] switch all filesystems over to
d_obtain_alias" removed some cases where fh_to_dentry() and
fh_to_parent() could return NULL, there are still a few NULL returns
left in individual filesystems.  Thus it was a mistake for that commit
to remove the handling of NULL returns in the callers.

Revert those parts of 440037287c which removed the NULL handling.

(We could, alternatively, modify all implementations to return -ESTALE
instead of NULL, but that proves to require fixing a number of
filesystems, and in some cases it's arguably more natural to return
NULL.)

Thanks to David for original patch and Linus, Christoph, and Hugh for
review.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Cc: David Howells <dhowells@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-12-08 19:49:32 -08:00