public inbox for cip-dev@lists.cip-project.org
 help / color / mirror / Atom feed
* 4.4-rt nilfs problem
@ 2024-12-11 21:56 Pavel Machek
  2024-12-12  3:06 ` Ulrich Hecht
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2024-12-11 21:56 UTC (permalink / raw)
  To: cip-dev, uli

[-- Attachment #1: Type: text/plain, Size: 2001 bytes --]

Hi!

This 4.4-rt release is proving more "fun" then average. Last problem I
hit is this one:

https://gitlab.com/cip-project/cip-kernel/linux-cip/-/jobs/8612057735

fs/nilfs2/dir.c: In function 'nilfs_find_entry':
2705
fs/nilfs2/dir.c:350:31: error: initialization of 'char *' from incompatible pointer type 'struct page *' [-Werror=incompatible-pointer-types]
2706
  350 |                 char *kaddr = nilfs_get_page(dir, n);
2707
      |                               ^~~~~~~~~~~~~~
2708

And I believe it is caused by 3ab089df2d67491785a5bdaab01cfab8eb35dab5
:

    nilfs2: propagate directory read errors from nilfs_find_entry()

@@ -345,25 +347,26 @@ nilfs_find_entry(struct inode *dir, const struct qstr *qstr,
                start = 0;
        n = start;
        do {
-               char *kaddr;
-               page = nilfs_get_page(dir, n);
-               if (!IS_ERR(page)) {
-                       kaddr = page_address(page);
...
+               char *kaddr = nilfs_get_page(dir, n);

Compiler does not like page * assigned into char *, and I don't blame
him.

I could probably hack something up -- like below -- but it raises
questions such as

a) "should kaddr by checked for IS_ERR like that"?

and

b) "am I comfortable changing code we are not testing"?

Best regards,
								Pavel

diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c
index 61ca998ac8013..ea0df90626a0d 100644
--- a/fs/nilfs2/dir.c
+++ b/fs/nilfs2/dir.c
@@ -347,8 +347,13 @@ nilfs_find_entry(struct inode *dir, const struct qstr *qstr,
 		start = 0;
 	n = start;
 	do {
-		char *kaddr = nilfs_get_page(dir, n);
+		char *kaddr;
+		
+		page = nilfs_get_page(dir, n);
+		if (IS_ERR(page))
+			return ERR_CAST(page);
 
+		kaddr = page_address(page);
 		if (IS_ERR(kaddr))
 			return ERR_CAST(kaddr);
 



-- 
DENX Software Engineering GmbH,        Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

end of thread, other threads:[~2024-12-12 11:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-11 21:56 4.4-rt nilfs problem Pavel Machek
2024-12-12  3:06 ` Ulrich Hecht
2024-12-12 11:53   ` [cip-dev] " Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox