linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 1/5] cramfs: small stat(2) fix
@ 2005-03-04 21:16 akpm
  2005-03-09 18:58 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2005-03-04 21:16 UTC (permalink / raw)
  To: greg; +Cc: linux-kernel, akpm, eric


From: Eric Lammerts <eric@lammerts.org>

When I stat(2) a device node on a cramfs, the st_blocks field is bogus
(it's derived from the size field which in this case holds the major/minor
numbers).  This makes du(1) output completely wrong.

Signed-off-by: Eric Lammerts <eric@lammerts.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/fs/cramfs/inode.c |    1 +
 1 files changed, 1 insertion(+)

diff -puN fs/cramfs/inode.c~cramfs-small-stat2-fix fs/cramfs/inode.c
--- 25/fs/cramfs/inode.c~cramfs-small-stat2-fix	2005-03-04 13:15:57.000000000 -0800
+++ 25-akpm/fs/cramfs/inode.c	2005-03-04 13:15:57.000000000 -0800
@@ -70,6 +70,7 @@ static struct inode *get_cramfs_inode(st
 			inode->i_data.a_ops = &cramfs_aops;
 		} else {
 			inode->i_size = 0;
+			inode->i_blocks = 0;
 			init_special_inode(inode, inode->i_mode,
 				old_decode_dev(cramfs_inode->size));
 		}
_

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch 1/5] cramfs: small stat(2) fix
  2005-03-04 21:16 [patch 1/5] cramfs: small stat(2) fix akpm
@ 2005-03-09 18:58 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2005-03-09 18:58 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, eric

On Fri, Mar 04, 2005 at 01:16:54PM -0800, akpm@osdl.org wrote:
> 
> From: Eric Lammerts <eric@lammerts.org>
> 
> When I stat(2) a device node on a cramfs, the st_blocks field is bogus
> (it's derived from the size field which in this case holds the major/minor
> numbers).  This makes du(1) output completely wrong.
> 
> Signed-off-by: Eric Lammerts <eric@lammerts.org>
> Signed-off-by: Andrew Morton <akpm@osdl.org>

Added to the -stable queue, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-03-09 18:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-04 21:16 [patch 1/5] cramfs: small stat(2) fix akpm
2005-03-09 18:58 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).