diff options
| author | 2011-07-27 00:54:47 -0700 | |
|---|---|---|
| committer | 2011-07-27 00:54:47 -0700 | |
| commit | aa7eb8e78d8ecd6cd0475d86ea8385ff9cb47ece (patch) | |
| tree | 3f9e98fadd5124fb05e8f6f9b06aa23698d4f215 /fs/fat/cache.c | |
| parent | Input: sh_keysc - fix compile warning (diff) | |
| parent | Input: synaptics - fix reporting of min coordinates (diff) | |
| download | linux-dev-aa7eb8e78d8ecd6cd0475d86ea8385ff9cb47ece.tar.xz linux-dev-aa7eb8e78d8ecd6cd0475d86ea8385ff9cb47ece.zip | |
Merge branch 'next' into for-linus
Diffstat (limited to 'fs/fat/cache.c')
| -rw-r--r-- | fs/fat/cache.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/fat/cache.c b/fs/fat/cache.c index ae8200f84e39..1cc7038e273d 100644 --- a/fs/fat/cache.c +++ b/fs/fat/cache.c @@ -151,6 +151,13 @@ static void fat_cache_add(struct inode *inode, struct fat_cache_id *new) spin_unlock(&MSDOS_I(inode)->cache_lru_lock); tmp = fat_cache_alloc(inode); + if (!tmp) { + spin_lock(&MSDOS_I(inode)->cache_lru_lock); + MSDOS_I(inode)->nr_caches--; + spin_unlock(&MSDOS_I(inode)->cache_lru_lock); + return; + } + spin_lock(&MSDOS_I(inode)->cache_lru_lock); cache = fat_cache_merge(inode, new); if (cache != NULL) { |
