diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2020-06-10 15:55:46 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-07-05 16:17:12 +0200 |
commit | 6685d24e295ce97b2708c45a7d31531a057a9fc0 (patch) | |
tree | 6a0c825f7a5a335d866935b55db26ed250a71840 /fs | |
parent | d0d073f12aaf09e856dc779cdf36410e3c8c68ea (diff) | |
download | barebox-6685d24e295ce97b2708c45a7d31531a057a9fc0.tar.gz barebox-6685d24e295ce97b2708c45a7d31531a057a9fc0.tar.xz |
fs: Make iput() accept NULL pointers
Let iput() accept NULL pointers so that users do not have to test for
it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fs.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1087,6 +1087,9 @@ void iget_failed(struct inode *inode) void iput(struct inode *inode) { + if (!inode) + return; + if (!inode->i_count) return; |