cifs: Use file_dentry()
authorGoldwyn Rodrigues <rgoldwyn@suse.com>
Mon, 18 Apr 2016 11:41:52 +0000 (06:41 -0500)
committerSteve French <smfrench@gmail.com>
Tue, 17 May 2016 19:09:33 +0000 (14:09 -0500)
commit1f1735cb75ab31ed948a7fce65beaaa6c0ed4ed4
tree35d88237f7ab55df1bf394d5c214185c2be03bd0
parent7f427d3a6029331304f91ef4d7cf646f054216d2
cifs: Use file_dentry()

CIFS may be used as lower layer of overlayfs and accessing f_path.dentry can
lead to a crash.

Fix by replacing direct access of file->f_path.dentry with the
file_dentry() accessor, which will always return a native object.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Acked-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: Steve French <smfrench@gmail.com>
fs/cifs/file.c
fs/cifs/readdir.c