Merge branch 'vfs-for-3.16' of git://git.infradead.org/users/hch/vfs

Pull vfs fixes from Christoph Hellwig:
"A vfsmount leak fix, and a compile warning fix"

* 'vfs-for-3.16' of git://git.infradead.org/users/hch/vfs:
fs: umount on symlink leaks mnt count
direct-io: fix uninitialized warning in do_direct_IO()

Changed files
+9 -8
fs
+7 -7
fs/direct-io.c
··· 198 198 * L1 cache. 199 199 */ 200 200 static inline struct page *dio_get_page(struct dio *dio, 201 - struct dio_submit *sdio, size_t *from, size_t *to) 201 + struct dio_submit *sdio) 202 202 { 203 - int n; 204 203 if (dio_pages_present(sdio) == 0) { 205 204 int ret; 206 205 ··· 208 209 return ERR_PTR(ret); 209 210 BUG_ON(dio_pages_present(sdio) == 0); 210 211 } 211 - n = sdio->head++; 212 - *from = n ? 0 : sdio->from; 213 - *to = (n == sdio->tail - 1) ? sdio->to : PAGE_SIZE; 214 - return dio->pages[n]; 212 + return dio->pages[sdio->head]; 215 213 } 216 214 217 215 /** ··· 907 911 while (sdio->block_in_file < sdio->final_block_in_request) { 908 912 struct page *page; 909 913 size_t from, to; 910 - page = dio_get_page(dio, sdio, &from, &to); 914 + 915 + page = dio_get_page(dio, sdio); 911 916 if (IS_ERR(page)) { 912 917 ret = PTR_ERR(page); 913 918 goto out; 914 919 } 920 + from = sdio->head ? 0 : sdio->from; 921 + to = (sdio->head == sdio->tail - 1) ? sdio->to : PAGE_SIZE; 922 + sdio->head++; 915 923 916 924 while (from < to) { 917 925 unsigned this_chunk_bytes; /* # of bytes mapped */
+2 -1
fs/namei.c
··· 2256 2256 goto out; 2257 2257 } 2258 2258 path->dentry = dentry; 2259 - path->mnt = mntget(nd->path.mnt); 2259 + path->mnt = nd->path.mnt; 2260 2260 if (should_follow_link(dentry, nd->flags & LOOKUP_FOLLOW)) 2261 2261 return 1; 2262 + mntget(path->mnt); 2262 2263 follow_mount(path); 2263 2264 error = 0; 2264 2265 out: