[Yaffs] ignoring return value of `inode_setattr'

Startseite
Anhänge:
Nachricht
+ (text/plain)
Nachricht löschen
Nachricht beantworten
Autor: Todd Poynor
Datum:  
To: yaffs
Betreff: [Yaffs] ignoring return value of `inode_setattr'
inode_setattr was marked __must_check in linux 2.6.7 or so...

fs/yaffs/yaffs_fs.c: In function `yaffs_setattr':
fs/yaffs/yaffs_fs.c:1218: warning: ignoring return value of `inode_setattr', declared with attribute warn_unused_result

The following patch is suggested, thanks -- Todd

Return error from inode_setattr(), avoid compile warning.

Signed-off-by: Todd Poynor <>

Index: linux-2.6.10/fs/yaffs/yaffs_fs.c
===================================================================
--- linux-2.6.10.orig/fs/yaffs/yaffs_fs.c    2005-07-13 00:40:25.000000000 +0000
+++ linux-2.6.10/fs/yaffs/yaffs_fs.c    2005-07-13 00:40:50.000000000 +0000
@@ -1220,7 +1220,7 @@
             error = -EPERM;
         }
         yaffs_GrossUnlock(dev);
-        inode_setattr(inode,attr);
+        error = inode_setattr(inode,attr);
     }
     return error;
 }