+ make-static-counters-in-new_inode-and-iunique-be-32-bits-comments.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     make-static-counters-in-new_inode-and-iunique-be-32-bits comments
has been added to the -mm tree.  Its filename is
     make-static-counters-in-new_inode-and-iunique-be-32-bits-comments.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: make-static-counters-in-new_inode-and-iunique-be-32-bits comments
From: Jeff Layton <jlayton@xxxxxxxxxx>

mention that it's only the case for 32bit, non-LFS stat.

Cc: Christoph Hellwig <hch@xxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/inode.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff -puN fs/inode.c~make-static-counters-in-new_inode-and-iunique-be-32-bits-comments fs/inode.c
--- a/fs/inode.c~make-static-counters-in-new_inode-and-iunique-be-32-bits-comments
+++ a/fs/inode.c
@@ -536,7 +536,11 @@ repeat:
  */
 struct inode *new_inode(struct super_block *sb)
 {
-	/* 32 bits for compatability mode stat calls */
+	/*
+	 * On a 32bit, non LFS stat() call, glibc will generate an EOVERFLOW
+	 * error if st_ino won't fit in target struct field. Use 32bit counter
+	 * here to attempt to avoid that.
+	 */
 	static unsigned int last_ino;
 	struct inode * inode;
 
@@ -696,7 +700,11 @@ static unsigned long hash(struct super_b
  */
 ino_t iunique(struct super_block *sb, ino_t max_reserved)
 {
-	/* 32 bits for compatability mode stat calls */
+	/*
+	 * On a 32bit, non LFS stat() call, glibc will generate an EOVERFLOW
+	 * error if st_ino won't fit in target struct field. Use 32bit counter
+	 * here to attempt to avoid that.
+	 */
 	static unsigned int counter;
 	struct inode *inode;
 	struct hlist_head *head;
_

Patches currently in -mm which might be from jlayton@xxxxxxxxxx are

make-iunique-use-a-do-while-loop-rather-than-its-obscure-goto-loop.patch
make-static-counters-in-new_inode-and-iunique-be-32-bits.patch
make-static-counters-in-new_inode-and-iunique-be-32-bits-comments.patch
change-libfs-sb-creation-routines-to-avoid-collisions-with-their-root-inodes.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux