Showing error 1670

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: fs/xfs/xfs_inode.c
Line in file: 2128
Project: Linux Kernel
Project version: 2.6.28
Tools: Smatch (1.59)
Entered: 2013-09-10 07:54:05 UTC


Source:

2098
2099                        /* Inode not in memory or we found it already,
2100                         * nothing to do
2101                         */
2102                        if (!ip || xfs_iflags_test(ip, XFS_ISTALE)) {
2103                                read_unlock(&pag->pag_ici_lock);
2104                                continue;
2105                        }
2106
2107                        if (xfs_inode_clean(ip)) {
2108                                read_unlock(&pag->pag_ici_lock);
2109                                continue;
2110                        }
2111
2112                        /* If we can get the locks then add it to the
2113                         * list, otherwise by the time we get the bp lock
2114                         * below it will already be attached to the
2115                         * inode buffer.
2116                         */
2117
2118                        /* This inode will already be locked - by us, lets
2119                         * keep it that way.
2120                         */
2121
2122                        if (ip == free_ip) {
2123                                if (xfs_iflock_nowait(ip)) {
2124                                        xfs_iflags_set(ip, XFS_ISTALE);
2125                                        if (xfs_inode_clean(ip)) {
2126                                                xfs_ifunlock(ip);
2127                                        } else {
2128                                                ip_found[found++] = ip;
2129                                        }
2130                                }
2131                                read_unlock(&pag->pag_ici_lock);
2132                                continue;
2133                        }
2134
2135                        if (xfs_ilock_nowait(ip, XFS_ILOCK_EXCL)) {
2136                                if (xfs_iflock_nowait(ip)) {
2137                                        xfs_iflags_set(ip, XFS_ISTALE);
2138
Show full sources