Re: [PATCH][3.2.y][3.4.y][3.10.y] jfs: fix readdir regression

Zefan Li <[email protected]>
Newsgroups gmane.comp.file-systems.jfs.general
Message-ID <5525D287.9010705__46835.5715311647$1428543649$gmane$org@huawei.com>
On 2015/3/24 5:06, Dave Kleikamp wrote:
> Upstream commit 44512449, "jfs: fix readdir cookie incompatibility
> with NFSv4", was backported incorrectly into the stable trees which
> used the filldir callback (rather than dir_emit). The position is
> being incorrectly passed to filldir for the . and .. entries.
> 
> The still-maintained stable trees that need to be fixed are 3.2.y,
> 3.4.y and 3.10.y.
> 
> https://bugzilla.kernel.org/show_bug.cgi?id=94741
> 
> Signed-off-by: Dave Kleikamp <[email protected]>
> Cc: [email protected]
> Cc: [email protected]

So upstream kernel is free from this bug, right? Then I'll queue it up
for 3.4.

> ---
>  fs/jfs/jfs_dtree.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/jfs/jfs_dtree.c b/fs/jfs/jfs_dtree.c
> index 9f7c758..f6f32fa 100644
> --- a/fs/jfs/jfs_dtree.c
> +++ b/fs/jfs/jfs_dtree.c
> @@ -3103,7 +3103,7 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
>  				 * self "."
>  				 */
>  				filp->f_pos = 1;
> -				if (filldir(dirent, ".", 1, 0, ip->i_ino,
> +				if (filldir(dirent, ".", 1, 1, ip->i_ino,
>  					    DT_DIR))
>  					return 0;
>  			}
> @@ -3111,7 +3111,7 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
>  			 * parent ".."
>  			 */
>  			filp->f_pos = 2;
> -			if (filldir(dirent, "..", 2, 1, PARENT(ip), DT_DIR))
> +			if (filldir(dirent, "..", 2, 2, PARENT(ip), DT_DIR))
>  				return 0;
>  
>  			/*
> 


------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.