fs: cleanup slight list_entry abuse
[firefly-linux-kernel-4.4.55.git] / fs / ntfs / inode.h
index db29695f845ce6d448aa44308c487342a4356142..b3c3469de6cb050f3422d70fe0fc0867003a408c 100644 (file)
@@ -239,7 +239,7 @@ typedef struct {
  */
 static inline ntfs_inode *NTFS_I(struct inode *inode)
 {
-       return (ntfs_inode *)list_entry(inode, big_ntfs_inode, vfs_inode);
+       return (ntfs_inode *)container_of(inode, big_ntfs_inode, vfs_inode);
 }
 
 static inline struct inode *VFS_I(ntfs_inode *ni)
@@ -316,6 +316,10 @@ static inline void ntfs_commit_inode(struct inode *vi)
        return;
 }
 
+#else
+
+static inline void ntfs_truncate_vfs(struct inode *vi) {}
+
 #endif /* NTFS_RW */
 
 #endif /* _LINUX_NTFS_INODE_H */