cifs: move file_lock off stack in cifs_push_posix_locks

struct file_lock is pretty large, so we really don't want that on the
stack in a potentially long call chain. Reorganize the arguments to
CIFSSMBPosixLock to eliminate the need for that.

Eliminate the get_flag and simply use a non-NULL pLockInfo to indicate
that this is a "get" operation. In order to do that, need to add a new
loff_t argument for the start_offset.

Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
This commit is contained in:
Jeff Layton
2012-07-23 13:28:37 -04:00
committed by Steve French
부모 ac3aa2f8ae
커밋 c5fd363d77
3개의 변경된 파일13개의 추가작업 그리고 16개의 파일을 삭제

파일 보기

@@ -386,8 +386,9 @@ extern int CIFSSMBLock(const int xid, struct cifs_tcon *tcon,
const bool waitFlag, const __u8 oplock_level);
extern int CIFSSMBPosixLock(const int xid, struct cifs_tcon *tcon,
const __u16 smb_file_id, const __u32 netpid,
const int get_flag, const __u64 len, struct file_lock *,
const __u16 lock_type, const bool waitFlag);
const loff_t start_offset, const __u64 len,
struct file_lock *, const __u16 lock_type,
const bool waitFlag);
extern int CIFSSMBTDis(const int xid, struct cifs_tcon *tcon);
extern int CIFSSMBEcho(struct TCP_Server_Info *server);
extern int CIFSSMBLogoff(const int xid, struct cifs_ses *ses);