net: Set fput_needed iff FDPUT_FPUT is set
[linux-2.6-microblaze.git] / net / socket.c
index 3c3d6ab..e08415b 100644 (file)
@@ -500,7 +500,7 @@ static struct socket *sockfd_lookup_light(int fd, int *err, int *fput_needed)
        if (f.file) {
                sock = sock_from_file(f.file, err);
                if (likely(sock)) {
-                       *fput_needed = f.flags;
+                       *fput_needed = f.flags & FDPUT_FPUT;
                        return sock;
                }
                fdput(f);